Jump to content

making a register script


Dangmnx

Recommended Posts

Why not write one yourself?

 

Make a table (called "users") to hold information like name, email, password hash, level (eg. 0=not activated, 1=user, 2=moderator, 3=admin), banned (enum['yes','no']) and any other information you need to store. Have the userid being the primary key.

 

Upon registration (register.php) check if the email is already used and not allow it again. Might want to do the same for the username.

 

When they register email them a link to activate the account. This can be in a separate table (called "activations") where you store their userid and the activation key).

 

Another script gets called when they click the link in their email (activate.php) checks the activation key & userid in the URL against the activations table and a match updates the level to 1 - user. If either didn't match they get told something didn't match and leave level as 0.

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.