energysuperstore09 Posted March 30, 2009 Share Posted March 30, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/151755-php-approval/ Share on other sites More sharing options...
ober Posted March 30, 2009 Share Posted March 30, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/151755-php-approval/#findComment-796852 Share on other sites More sharing options...
energysuperstore09 Posted March 30, 2009 Author Share Posted March 30, 2009 as I am trying to figure this out I am new to this. Could you maybe give me an example? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/151755-php-approval/#findComment-796854 Share on other sites More sharing options...
premiso Posted March 30, 2009 Share Posted March 30, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/151755-php-approval/#findComment-796857 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.