ryeman98 Posted July 18, 2007 Share Posted July 18, 2007 Hi. I've recently added a new game to my site and the adding score won't work... To be honest, I'm not sure how to do this so maybe you could help. Pocobueno, if you help again that would be so awesome! xD $score = $_POST['score']; $name = $_POST['name']; if ($_SESSION['username']) { $username = $_SESSION['username']; $addpoints = mysql_query("UPDATE users SET points=points+$score WHERE username='$username'"); } $insert_score = mysql_query("INSERT INTO rps (name, score) VALUES ('$name', '$score')"); echo "Your score has been submitted. Go <a href='scores.php?page=rps'>here</a> to view the high score table!"; } And yes... I do have session_start(); at the top of my page Link to comment https://forums.phpfreaks.com/topic/60483-adding-score/ Share on other sites More sharing options...
ryeman98 Posted July 18, 2007 Author Share Posted July 18, 2007 Bumping this up because I don't have a lot of time tonight... Link to comment https://forums.phpfreaks.com/topic/60483-adding-score/#findComment-300879 Share on other sites More sharing options...
ryeman98 Posted July 18, 2007 Author Share Posted July 18, 2007 Sorry for triple posting and all that. But I still need some help with this... :-\ Link to comment https://forums.phpfreaks.com/topic/60483-adding-score/#findComment-300900 Share on other sites More sharing options...
clearstatcache Posted July 18, 2007 Share Posted July 18, 2007 what's wrong with the code? Link to comment https://forums.phpfreaks.com/topic/60483-adding-score/#findComment-300957 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.