elo! i’m back and i need help.
i have a registration form that receives user’s input like firstname,lastname…etc. and of course a validation.
the problem is when a user mistakenly inputs a wrong validation and tries to submit it the error message and the fields are cleared, and i think it’s wrong it should still display the user’s input.
here is my code for the registration:
[php]
<?php require_once 'include/top.php';?> |
<?php require_once 'include/mainmenu.php';?> |
<?php echo $message; ?> | ||||
Notice: except for the secondary address, all fields are required to be filled up. Before clicking register you must make sure that you have checked the checkbox. thank you | ||||
User Account Registration | ||||
and here is the succes page: [code] <?php if (!isset($_POST['secret'])) if (($_SESSION['secret'] != $_POST['secret']) || (!isset($_SESSION['secret']))) { //Call error handling function with $problem = 2 (minor security breach) } else { //unset() session variable //unset($_SESSION['secret']); } require_once 'processreg.php'; ?>
**MOD Edit - Added php tags for better readability. |