first off third question I’ve asked and all have been answered well! So thanks to everybody who reads my posts (and others I guess)
I’ve gotten as far as I can without complete help on this one. I need to create a username and password section. I’ve done this before using htaccess, htauth files. Works well. Secure, and log’s them in fine. What I’m looking for though is some sort of script that will take a specific user to a specific page after login.
User1= user1.php
user2= user2.php
Ect.
Is this possible without a whole lot of work? I can make workarounds where the users login to the main index, then go where they need to, but then anyone logged in can go to anyone’s page.
I’m not asking anyone to write the code. But even some guidance to some tutorials would be great!
If the page is authenticated using .htaccess, upon successful login the username is available as
$_SERVER['PHP_AUTH_USER'].So you can either redirect the user using Location, or even better, directly include() the desired file.
You can place the user1.php, user2.php, … files in a directory of their own, with a .htaccess that disallows direct access. This won’t stop PHP from being able to include the files, and this way only the authenticated user can have access to his file.