Guest Posted April 2, 2008 Share Posted April 2, 2008 Hi im wanting to build a login system that when a user logs in it take them to a there private page eg. john logs in and it take him to john.php Ned logs in it takes him to ned.php is this possible if so any tips hints or ideas on how to go about this ? should i use flat file ? im not wanting to capture details or anything or have a regestar page just as long as i could add them ... Thanks in advace. Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 2, 2008 Share Posted April 2, 2008 http://www.google.ca/search?q=php+login+script Or if you want a flat file specifically http://www.google.ca/search?hl=en&q=php+login+script+flat+file Quote Link to comment Share on other sites More sharing options...
Guest Posted April 2, 2008 Share Posted April 2, 2008 But how would i get the differnt users to go to differnt pages? Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 2, 2008 Share Posted April 2, 2008 header('Location: ' . $username . '.php'); Could work Quote Link to comment Share on other sites More sharing options...
bryan52803 Posted April 2, 2008 Share Posted April 2, 2008 I would create a .php file, private.php, for example. have 'private.php' check session data for the user-ID, then build the page custom accordingly in PHP. You can pass along the userrname using a querystring, 'private.php?user=John' Then you can use URL Rewrite to fashion it so it pips 'private.php?user=John' when the user requests 'http://www.mypage.com/John' Then finally, after verfying the login information, pull a: header('Location: http://www.mypage.com/$user'); exit; Bryan Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted April 2, 2008 Share Posted April 2, 2008 instead of sending people to diffent pages why not call a page in a MySQL Table so that if a user logs in it doesnt send them to john.php but rather it sends them to: http://www.yourdomain.com/secret.php?user=john&session-id=23786asc8yu37gfsdb34 Quote Link to comment 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.