Left Quote    By failing to prepare, you are preparing to fail.
- Benjamin Franklin    
Right Quote
[login] | [Register]

Complete Members System

by: bs0d
Page: 3 of 9
(View All)


Now we discuss the register script. This is the form that visitors will fill out if they decide to become a member. The form is basic HTML, but we use php to analyze and store the values in the members table. We need to decide what will appear on the form.
  1. username field: Indicate the max length (25 chars) and minimum, and possibly what values are accepted (A-Z, 0-9) - whatever you decide. We can create an array of rejected characters, search the username value to see if it contains any of these values, and display an error if a match is found. Check the length to see if its too small, show an error if its smaller than the length you decide on.
  2. password field: Indicate max length (32) and minimum, and just like the username field, the characters that would be not accepted. Can search this value the same as explained above as well. Also can check the length of the password entered and if its too small, display an error.
  3. verify password: This is an optional field, but I would recommend it. This ensures that the user is aware of exactly what he or she entered. We will check if this field is identical match to the password field. If they do not match, display an error.
  4. email address: Allow them to enter their email address. Could be optional, or it could be required. You could use this to possibly inform them of updates to the site, or a newsletter. Therefore, it might be handy to know that the email address they entered, is valid. To verify that, send an activation code to the email specified, make them follow a link and enter the code. If the membership is activated, then you know they put in a real email address, and have access to it.

What you want to do is try to eliminate all of the errors, so that what you get in the database is exactly what you want, and what the new member wants. You have to think out all possible senarios, and check each with code to hault execution if that condition is met.

Its also nice to know that 90% of your registered members are actually members, and not a form of spam. Thats more reasoning behind something like email activation, and also incorperating something like an image validation (Enter code appearing in this image). Spam bots cannot see what dynamically generated in the image, so it must be a person genuinely interested that is wanting to sign up.

This is BASICALLY all you need. Everyone that reads this should explore adding more to what I have shown so far. All you need to do is add the appropriate columns to the table, and create a field in this script. Some things you could add are: Registration date, ICQ #, MSN id, Yahoo ID, Interests, Location, etc.

1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  
Next »


  Subject: "help" Date: Mar 16 2008 at 8:35 pm    
can some one please help me i would like to know where to create the table and how please i really need this help
  Subject: "re: help" Date: Mar 17 2008 at 4:35 pm    


Create the table in your database. Using PhpMyAdmin (as described on page 1) makes it easier to manage.
You Must be logged in or a member to comment.

Tutorial Stats

Tutorial Stats

41 Total Comments
4.8 Rating of 5 (5 Votes)


Tutorial Options

· Login to Rate This Article
· Login to Post a Comment
· Read more by this author
Digg This Article! Bookmark This Article Reddit: Bookmark This Article BlinkList: Blink This Article! YahooMyWeb BlogMarks: Add This Mark! Furl: Save This Article Spurl: Mark This Article



· Simple PHP Tutorial
· One File Website
· Pagination with PHP
· Building a Comments Script
· Variable Scope

"" Copyright © 2002-2020; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank