Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Custom page based off username
06-30-2005, 07:56 PM #1
- Join Date
- Mar 2005
- Thanked 0 Times in 0 Posts
Custom page based off username
Hey gang, just looking for a small bit of help here if you could.
The system I am working on is this:
2) Loads User Profile Page
3) This page is custom to the user, so they can edit their details and such (e-mail, age, etc).
4) What I am not worried about is the login information, the database change information (changing age from 22 to 23 for example) and the database pull of information (pulling the original values for viewing).
5) What I am looking for help on is just the custom page. I just want to create one page (profile.php for example) that will be custom to the users login.
If you need any more questions answered, I will. I just have no idea where to start to get it to load the information based off the username.
What I am thinking is something along these lines:
$query = "SELECT age, email from USERS where uid='" . $username . "'";
06-30-2005, 08:38 PM #2
- Join Date
- Aug 2003
- One step ahead of you.
- Thanked 3 Times in 3 Posts
When the user logs in his user id should be added to his session. All other pages would acces his user id from the session.
You can read about sessions in the PHP manual: http://www.php.net/session
I'm not sure if this was any help, but I hope it didn't make you stupider.
Experience is something you get just after you really need it.
PHP Installation Guide Feedback welcome.