rogonow Posted January 7, 2011 Share Posted January 7, 2011 I try to get a high score system to work. The problem is to write data to the txt file: The file adder.php contains: <?php if(array_key_exists('name',$_GET)==true and array_key_exists('score',$_GET)==true) { $name=$_GET['name']; $score=$_GET['score']; $file=fopen('highscore.txt','a'); fwrite($file,$name.';'.$score.';'); fclose($file); } header("Location: index.php"); // Replace index.php with the name (and, if not in the same folder, path) // of the page that will display the scores (see below) ?> I use this website: http://members.multimania.nl, so it looks like http://members.multimania.nl/mine/adder.php?name=winner&score=99 What am I doing wrong? Link to comment https://forums.phpfreaks.com/topic/223634-high-score-system/ Share on other sites More sharing options...
phpchamps Posted January 7, 2011 Share Posted January 7, 2011 did you check the permission ??? Link to comment https://forums.phpfreaks.com/topic/223634-high-score-system/#findComment-1156154 Share on other sites More sharing options...
rogonow Posted January 7, 2011 Author Share Posted January 7, 2011 I see next error only at an other site without permission: 500 phpwrapper internal error : ERR_MISSING_CGI_PRIVILEGE (31) Is it possible that Multimania scips this error and shows me then the highscore list? Link to comment https://forums.phpfreaks.com/topic/223634-high-score-system/#findComment-1156158 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.