Drags111 Posted November 13, 2007 Share Posted November 13, 2007 Hey guys, I'm not that great with html (but im learning) and i need to make a registration page. Some things I need to know how to do: 1: Verify that passwords match. (password verification) 2: Block certain characters from Username and password. 3: If they didn't fill out the form completely, then it wouldnt let them continue to the php script. Heres what I got for a starters: <html> <body bgcolor="black" text="white" background="GMInternetLogo.png"> <font face="courier new"> <table border="1"> <tr> <td> <form action="registerscript.php" method="post"> Username: <input type="text" maxlength="25" name="usr" /> <br/> Password: <input type="password" maxlength="32" name="pass" /> <br/> <input type="submit" value="Login" /> </form> </td> </tr> </table> </body> </html> All help is MUCH appreciated. (i have the server-side stuff done, I'm just horrible with html) Quote Link to comment Share on other sites More sharing options...
Aureole Posted November 13, 2007 Share Posted November 13, 2007 For no.1 you'd need another form field then something like... <?php if($_POST['pass1'] == $_POST['pass2']) { // Passwords match. } ?> For no. 2 you'd use regex (don't ask me). For no. 3 you'd do something like <?php if(isset($_POST['something']) && isset($_POST['somethingelse'])) { // Everything was sent. } ?> Quote Link to comment 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.