I have user registration form which collects all necesary information. When user checks the box "I Agree all terms and conditions", submit button is enabled so user can submit form. I am posting this data to another php page which does validation and if any error is found, registration form appears again showing certain errors that some necessary information is missing.
Problem: I am unable to retain the values of the form when user is redirected back to registration form though i have putted the following code:
<input type="text" size="40" name="email" value="<?php echo isset($_POST['email']) ? $_POST['email'] : NULL; ?>" />
I am using
header("location: form.php");
when errors are found in my php page which does validation. Is this line creating a problem for me or is there anything else? I am unable to figure out the problem.
EDIT: In addition if any one can guide me that how can i retain the values selected through radio button and combo box i'll be thankfull.