|
Page 1 of 1 |
sTo0z
[Moderator] Babysitter
Posts: 7449
Location: USA
|
Posted: Thu, 19th May 2005 02:36 Post subject: More PHP help... lol |
|
 |
Aight, sorry, but I suck and I admit it, and I love you guys so here I am again.
I'm trying to write a simple registration page, with some VERY simple validation done with PHP.
I'm trying to make sure the fields are filled in correctly. Here is the first snippet to try and make sure they even filled in the boxes:
Code: | if(!isset($_POST['username']) || !isset($_POST['password']) || !isset($_POST['passconfirm']) || !isset($_POST['email'])) |
I wanted that to make sure the fields were even filled in, I also tried empty() and !$_POST but both of those didn't work either. I can put in empty fields everytime and that piece of code never hits.
I also tried to make sure the password fields were the same, otherwise create an error, which is:
Code: | if($_POST['password'] != $_POST['passconfirm']) |
But that never hits either, even when the values in the two password fields are completely different.
Here is my form (disregarding all "that was dumb" mistakes please):
Code: | <FORM class="register" name="register" ACTION="register.php" METHOD="get">
<input type="text" name="username" maxlength="32">
<div id="katext">Username</div>
<br><br>
<input type="password" name="password" maxlength="32">
<div id="katext">Password</div>
<br><br>
<input type="password" name="passconfirm" maxlength="32">
<div id="katext">Confirm Password</div>
<br><br>
<input type="text" name="email" maxlength="32">
<div id="katext">E-mail Address</div>
<br>
<input type="submit" name="submit" value="Submit">
</FORM> |
Help? 
|
|
Back to top |
|
 |
sTo0z
[Moderator] Babysitter
Posts: 7449
Location: USA
|
Posted: Thu, 19th May 2005 06:12 Post subject: |
|
 |
Nevermind, figured it all out. 
|
|
Back to top |
|
 |
|
Posted: Fri, 20th May 2005 18:17 Post subject: |
|
 |
Would be interested to learn how you sorted this please mate?
|
|
Back to top |
|
 |
Page 1 of 1 |
All times are GMT + 1 Hour |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group
|
|
 |
|