rav_0 Posted August 2, 2008 Share Posted August 2, 2008 Hi, basically I have the form in a table and have set all the variable of the text box as $_POST and that is passed to the form handler registrationprocess.php and using $_GET[action] in a switch the php vaildate the form but it does work I think there is a problem with the passing of the $_Post variable of the textbox in the if statement, I have a feeling it something simple im missing maybe, but it does vaildate the form as it check is anything was entered. Need some help on this from more experienced developer this is my first registration form. Sorry for the messy code. Download the file. Thanks in advanced [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/117863-registration-php-problem/ Share on other sites More sharing options...
DeanWhitehouse Posted August 2, 2008 Share Posted August 2, 2008 I dont think someone will download it and fix it all, try showing the code and we will point out where you have gone wrong Quote Link to comment https://forums.phpfreaks.com/topic/117863-registration-php-problem/#findComment-606238 Share on other sites More sharing options...
rav_0 Posted August 2, 2008 Author Share Posted August 2, 2008 The problem the code is too long and there a include anyways I take parts of the code, ok in the php file i used the print statement to print html code, 1(input type): <input type='text' name='newusername' value='$_POST[$newusername]' /> so the superglobal $_Post i put so when the form is refresh the data is still there after the submit is clicked the php code is process as shown below: starting of the switch code: switch ($_GET[action]) { case "vaildation": if (empty($_POST['newusername']) > 0 && empty($_POST['newpassword']) > 6 && empty($_POST['confirmnewpassword']) > 6 && empty($_POST['firstName']) > 0 && empty($_POST['lastName']) > 0 && empty($_POST['address']) > 0 && empty($_POST['post_code']) > 4 && empty($_POST['telephone']) > 10 && empty($_POST['email']) > 0 && empty($_POST['emailconfirm']) > 0 && $_POST[tc] =="checked") { I have think that the syntax in the html code of the form is causing the problem but anyways here is the code. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/117863-registration-php-problem/#findComment-606240 Share on other sites More sharing options...
DeanWhitehouse Posted August 2, 2008 Share Posted August 2, 2008 make sure you have error reporting turned on put this at the top of the page error_reporting(E_ALL); Quote Link to comment https://forums.phpfreaks.com/topic/117863-registration-php-problem/#findComment-606244 Share on other sites More sharing options...
rav_0 Posted August 2, 2008 Author Share Posted August 2, 2008 Hi, according to the error message Notice: Undefined index: post_code and other message shows there a problem with the variable for this, how can I solve this. thanks Quote Link to comment https://forums.phpfreaks.com/topic/117863-registration-php-problem/#findComment-606251 Share on other sites More sharing options...
DeanWhitehouse Posted August 2, 2008 Share Posted August 2, 2008 i am not physic, try showing the error message and the lines where the error is Quote Link to comment https://forums.phpfreaks.com/topic/117863-registration-php-problem/#findComment-606312 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.