Load URLs Loadstrings help!
in
Programming Questions
•
2 years ago
Hey all, I couldn't be more confused, I'm tying to get processing to load up a php script and send the int vaule of score to it but it's kicking out an error about the url, here is the code, the php and the error msg:
- {
- loopcheck2 = 1;
- String url ="score.php" + score; // i've tried my site as the url "www.epiphanystudios.co.uk/score.php" still get errors
- loadStrings(url);
- }
- error: The file "score.php1" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
here is the PHP:
- <?php
- session_start();
- $score = $_GET['score'];
- $connect = mysql_connect('','',''') or die("couldn't connect");
- mysql_select_db("test")or die("can't find ya database fool!");
- $query = ("SELECT rank FROM players WHERE player_name = '{$_SESSION['player_name']}'");
- $dbscore = mysql_query($query);
- if($score > $dbscore)
- {
- mysql_query("UPDATE score SET score = '$score'
- WHERE player_name = '{$_SESSION['player_name']}'");
- }
- ?>
Any ideas would be greatly appreciated :D
Harrison.
1