Jump to content

PHP Approval


Recommended Posts

I made a login page where people can register for there own username and password.  Is there a way that when people regsiter I have to approve is before they can actually login.

 

There is info where only certain people can view, but right now anybody can register and login.

 

I want to make sure that they are the people that can view this information.

 

Also how can I make it auto generate a email notifying that someone will be approveing it and will notify once approved that they can now login.

 

Any help would be appreciated. Thanks.

Link to comment
Share on other sites

Add a column to your user table called "enabled" or something.  In your script where the user is added to the database, set that value to 0 when they sign up.  Send them the email stating that it will need to be approved at the same time. 

 

Create a listing for yourself that allows you to select users and update them, which just changes that "enabled" field to 1.  Then when you check the user as they are logged in, check this field to see if they can login or not.  Make sure you send them an additional email when you enable their account so they know they can login.

Link to comment
Share on other sites

http://www.evolt.org/PHP-Login-System-with-Admin-Features

 

Not exactly what you are looking for, but if you implement you should be able to hack the code to suit your needs. There is not a hardset tutorial or example of exactly what you want (rarely there is). So you have to go and read up on different parts, such as how to send an email to a user. How to create a database with MySQL and how to query that with SQL.

 

The above tutorial should get you rolling on parts of it, but it still expects a basic knowledge of SQL and PHP, which it seems you probably do not have.  So I would read up on the basics of PHP and SQL before going much further.

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.