on the link where it goes to the registration page set the session variable to '' like if($_GET['register']) $_SESSION['question_val'] = 0;