Log in

View Full Version : login script



bjf98
12-24-2007, 12:48 PM
Hi!
I am looking for a good php login script.
I was wondering if anyone could recommend one that's not to complicated.

I am trying to get a script where you can't view the website unless you are logged in. (no bypassing)

If anyone can help, it would be greatly appreciated!

bjf98

Medyman
12-24-2007, 03:47 PM
How do you plan to manage usernames/pwords? Database?

djr33
12-24-2007, 06:28 PM
Will there be on password, or multiple accounts, and can you use databases?
(Medyman already asked part of that, though.)

Master_script_maker
12-24-2007, 06:29 PM
https://sourceforge.net/projects/phpmylogon/
http://www.stargeek.com/php_scripts.php?script=16
http://sourceforge.net/projects/uma/

bjf98
12-25-2007, 12:00 PM
Sorry for taking so long to reply.
Yes, I have access to a database
Either way will be fine. I could have one password, or multiple accounts. It doesn't matter to me.

djr33
12-25-2007, 06:49 PM
If you just have one password, I suggest a simple script using PHP:
1. Use sessions.
2. Check if $_SESSION['loggedin'] is set. If not:
3. Display the login forum and hide everything else.
4. That will submit the password;
5. The password will match the stored value in the PHP (which will be secure).
6. Store loggedin=1 in the session.
7. Now, it checks and verifies:
8. Display the content, don't display login form.
9. Add a log out option which destroys the session or unsets the loggedin value.

If you do require/prefer multiple multiple users, you would be best using MySQL and doing the same idea overall, but you'll need to deal with username as well, then, and compare to a database.

You can try this script for something more complex and ready to go: http://twey.co.uk?q=loginscript