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
https://forums.phpfreaks.com/topic/151755-php-approval/
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
https://forums.phpfreaks.com/topic/151755-php-approval/#findComment-796852
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
https://forums.phpfreaks.com/topic/151755-php-approval/#findComment-796857
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.