mrgoodboy77 Posted July 30, 2006 Share Posted July 30, 2006 I'm looking for a way to once someone logs in using there username and pw, it will display info that I have stored about that person. Something like you see on Amazon or other big sites, ya know. A) How do I display the stuff on a html pageB) Where do I store the stuffI'm still new at php, so if theres a script out there for me or something..Thanks! Quote Link to comment Share on other sites More sharing options...
tomfmason Posted July 30, 2006 Share Posted July 30, 2006 ok what you are referring to is sessions or cookies. for sessions do this in your login script.at the begining of your script put this. This must come first, before anything else.[code=php:0]<?phpsession_start();[/code]Now after you process the login. You can set the session variables like this[code=php:0]$_SESSION['username'] = $username[/code] You can repeat this for anything that you want to store in the session Now you can display this is html like this[code=php:0]<html><head><title>Test Page</title></head><body><p>Welcome <b><?php echo $_SESSION['username']; ?></b>. You are now logged in.</p><!---some more html---></body></html>[/code]Hope this helps,Tom 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.