This is a discussion on "mysql data loads once user login" within the PHP Forum section. This forum, and the thread "mysql data loads once user login are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
mysql data loads once user login
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
mysql data loads once user login
Am not looking for code or examples just advice!!! I desire to load a users data from a database once they successfully login to my website.
How shall i manage this?? Possibly use a cookie?? Or maybe session?? Here is the setup, a user logs in & is directed to a page that is setup to display there data from the mysql database!! Any answers or advice would be great!!! I have managed this before with Rakuli's great help & it does work but has a few problems... Please help! Thanks. |
|
|
|
#2
|
||||
|
||||
|
Re: mysql data loads once user login
Sessions would be the best option.
Make sure it's secure though. I will find a great article for you in a minute, it has tips for securing sessions.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#3
|
|||
|
|||
|
Re: mysql data loads once user login
Hey Alex, how you bin???
Long time no hear mate Thanks for the repley!!! Sessions it is then... Look forward to the article!!! You still eating kebabs |
|
#4
|
||||
|
||||
|
Re: mysql data loads once user login
Either way works great. You can give them a choice about whether or not to set a permanent cookie and bypass the login screen.
|
|
#5
|
|||
|
|||
|
Re: mysql data loads once user login
Thanks mate!!
|
|
#6
|
|||
|
|||
|
Re: mysql data loads once user login
Recently i succesfully created my edit accounts page with file upload!!! When the user is logged in there data automatically appears in the edit account page ussing this code:
|
|
#7
|
||||
|
||||
|
Re: mysql data loads once user login
Well I can't find the exact one because I don't have time, but here's one and there's plenty of other stuff on sessions on that blog, it's pretty good!
And yes, I love a good kebab
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#8
|
||||
|
||||
|
Re: mysql data loads once user login
Quote:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#9
|
||||
|
||||
|
Re: mysql data loads once user login
The exclamation mark has never felt so needed as in your posts Longstand!
The reason that your user data isn't loading up when you store it in the session is the way that you have the accounts.php set up. When you go to accounts.php it is expecting the query string to be something like accounts.php?id=1... it needs you to send the $_GET variable so the script can load up the passed ID. If you are storing thne user's ID in the session, you need to attach ?id=[userIdHere] for any link you have to the profile page. Either that, or, within the accounts.php page, have it use the stored session ID if the $_GET variable is not set.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#10
|
|||
|
|||
|
Re: mysql data loads once user login
Thanks guys!!! I will try that.. That code you done for me Rakuli worked the last time you helped, and did solve the problem but i kepy getting error messages saying i had two user login sessions set up....
So i had to try and change it.. Al try out that: ?id=[userIdHere !! And try and solve the problem!!! Thanks for the help... Am sure i will solve the today |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| User login or anonymous? | alexgeek | Website Planning | 6 | Jan 22nd, 2008 05:51 |
| [SOLVED] Dispaly User Data Once Logged In | longstand | PHP Forum | 2 | Nov 21st, 2007 20:16 |
| user login security question | tnikolov | Starting Out | 5 | May 7th, 2007 17:46 |
| User login by ASP.net | redkyna | ASP.NET Forum | 3 | Aug 9th, 2004 09:36 |
| Filter data based on user (MSSQL) | Webforumz Staff | Databases | 4 | Sep 19th, 2003 05:48 |