PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi!
I am trying to create a user registration page. I have created the registration form called "register.html". This is where the user enter the information. When the user press submit it should put that information into the post array and direct the user to add_user.php. Currently this isn't finished and only checks if data has been entered into the form. But it always says that there is no data in the post array.
<?
//connect to mysql and select database
include 'C:\webserver\include\login\connect.php';
//checks if info has been put into each field if one field has no info echo and die
if (($_post['username']==false)||($_post['password']==false)||
($_post['confirm_password']==false)||($_post['full_name']==false)||
($_post['email1']==false)||($_post['email2']==false))
{echo "Please fill in all fields.";
include 'register.php'
;die();}
?>
This always returns line 8,9 and 10. Please could someone help me!!
i'd have thought it'd be something to do with your form. To be honest I haven't the type of syntax your using . I'm pretty sure if you used something like
Your code (register.html and add_user.php with $_POST) works fine on my machine. When I enter all the values I dont get the 'Please fill in all fields' as you initially complained in your post.