Jump to content

Registration php problem


rav_0

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.