I have the following code that I want to be able to keep track of how many times a user gets the same answer wrong:
$count = 0;
if(isset($_POST['Submit'])){
if($question != 125){
$count++;
}else{
header("Location: [url]http://www.christianartnetwork.com/enter.html[/url]");
}
if ($count = 1){
$error = "Please refer to Book";
}else if ($count = 2){
$error = "Please refer to Chapter";
}else if ($count = 3){
$error = "Please refer to Verse";
}
}
Problem is that every time the form is submitted, count gets reset back to zero. How do I get it to remember the value stored in $count every time the form is submitted and if the answer is still wrong, add one to $count?
Thanks for your help.