Jump to content

Recommended Posts

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]

Link to comment
https://forums.phpfreaks.com/topic/117863-registration-php-problem/
Share on other sites

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.