yakoup46 Posted April 16, 2010 Share Posted April 16, 2010 I am trying to keep track of the number of wrong guess' that someone has submitted. I am not really sure what to do, I want to avoid database entries, b/c the data is only purposeful per visit. So... $box1 = 0; if(isset($_POST['buttonsumofodds']) || $_POST['inputbox1']) { $sql="INSERT INTO Sumofodds (ValueOdds) VALUES ('$_POST[inputbox1]')"; if($_POST[inputbox1] != 280) { echo "Sorry Wrong!"; $box1++; echo $box1; } else { echo "Correct!"; } } Obviously this code is just code to print "Sorry Wrong 1" and when they go back it try again and fail it will print "Sorry Wrong 1". So, I was wondering if there was someway to track the IP address, or something, so the server noes to increase $box1 per IP address. Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted April 16, 2010 Share Posted April 16, 2010 Use session. Quote Link to comment Share on other sites More sharing options...
yakoup46 Posted April 16, 2010 Author Share Posted April 16, 2010 OMG!!! Duh I am an idiot! Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.