User Registration Checklist

Associate
Joined
26 Jun 2003
Posts
1,140
Location
North West
Im building a registration feature on a site and im just wondering what checks need to be made before submitted the form. Here are the fields I have

Username
Password
Confirm Password
Email
Date of Birth (containing 3 fields: day, month, year)

Now here is the list of things I am checking to see if the user has done everything correct.

Check if any of the required fields are empty
Check if the date values are integers
Check if the date is valid
Check the username contains nice characters ('/[a-zA-Z_0-9{1, 20}]/')
Check the password fields match
Check if the email address is valid '[^@]{1,64}@[^@]{1,255}'
Check to see if a user already has the same username

Can anyone see if other checks I need to make?
What fields do I need to check for any naughty content such as javascript, SQL injection, etc?
Whats the best order to to the checks in?

(Also can sum1 tell me how I would go about automatically sending an email to the user to activate thier account?)

Thx a lot
JD
 
Last edited:
Ive also come accross if the user enters this for thier username then its accepted:

<?=$foo?>

So how can I stop php code being inputed from user input?
 
Back
Top Bottom