I'm currently using the following script from www.zubrag.com to protect my php pages. Is there any way I can direct my users to a different page with different login names? I want people to be able to edit their account just like in yahoo, google, facebook etc... I would include the script but it's too long, here's where it's located (you have to download it) http://www.zubrag.com/scripts/password-protect.php
Copyright © 2024 EBIN.TIPS - All rights reserved.
Answers & Comments
Verified answer
You would have to modify the script to store the username in a cookie. It's better to make something of your own then though, preferably using sessions (look them up in the PHP manual). Using the username you can make a page redirect.php that has (pseudo-code; will not be 100% correct, so it wont work out of the box)
if($_SESSION['username'] == "johndoe")
header("Location: johndoe_secret_df7ds6.php");
else if($_SESSION['username'] == "otherguy")
header("Location: otherguy_secret_ghg598.php");
There might be some other login scripts though that have a more complete admin system to it, with more features.. If you don't want to code it yourself you're probably better off trying to find something else that fits better.