Jump to content

Registration help...


Drags111

Recommended Posts

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)

Link to comment
Share on other sites

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.
}
?>

Link to comment
Share on other sites

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.