June 26th, 2013, 09:31 PM
Generating a new webpage for a user after login
I'm trying to create a very small website for the sake of practicing/learning PHP and I'm trying to create a login page that directs a successfully logged in user to their own 'home page' which can contain some things that are different between every user.
I'm pretty new to PHP so I'm not sure how to approach this. Would I have to create a new html page for every user that gets successfully registered/added to my database?
Any suggestions would be helpful.
June 26th, 2013, 10:21 PM
PHP generates dynamic web pages, that's what it's for and that's why it was invented. Don't think of it as "making an HTML document," PHP prints HTML as part of its general use. Simply print different things based on the user. It can be as simple as printing "Hello, <username>" at the top of the screen or as complex as you like. Start with just getting a page to print the information you know about a user (usually name and email).
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.