PHP programming with different pages based on different user logins…?
How do I program in php a login page that, based on the username/password, calls DIFFERENT php pages for each username? For instance, if you type in MARY/PASS123 in my_login.php, it should take you to mary.php, and if you type TOM/PASS789, it takes you to tom.php…
Basically, each login gets a different .php, but most answers I’ve seen just show how to get past the login page, not a differential of what type of page is returned after login passes. E.G., MARY/PASS123 and TOM/PASS789 would both take you to generic.php….
Thanks!
You would have to grab the username from the $_POST array, and then do a redirect after processing the login credentials with something like:
header("Location: ".$_POST['username'].".php");
You would have to grab the username from the $_POST array, and then do a redirect after processing the login credentials with something like:
header("Location: ".$_POST['username'].".php");
References :