Thread: php SESSION - How do I handle SQL data for logged in user??
Started 1 month, 4 weeks ago by Copenhagener
This ought to be so obvious and essential, but I don't understand how I retrieve and update SQL data for a logged-in user with php SESSION.
I have searched and read, but the tutorials only explain how I register and start a session for a user, but not the most important part: How do I extract SQL data for this user, and update his data in the SQL database?
I have made a registration ...
First, PHP's session's is used to store data across multiple page requests. It doesn't have anything to do with the database. It simply holds values in an array for you.
Second, you need to call session_start() before any content is generated to the browser, which means people generally put it near the very top of the script.
Third, you need to call session_start() before any calls to the...
First, PHP's session's is used to store data across multiple page requests. It doesn't have anything to do with the database. It simply holds values in an array for you.
Second, you need to call session_start() before any content is generated to the browser, which means people generally put it near the very top of the script.
Third, you need to call session_start() before any calls to the...
Thank you, Kudose, I will try out your hints when I come back home from work today.
What do you mean with " None of this takes data validation into account " ? That I should check the data being passed in through the session too, or?
I will be returning with my results later.
Thanks again.
A very big THANK YOU for spelling it out for me. I can know that you may sometimes be rolling your eyes over us newbies asking questions all the times, but so far I have had very good response from this forum, which is much appreciated.
Here is my final script, where I assign the user index as the session variable, making it possible for the user to change his alias later (could I as well ...
You are free to change the session data as often as you'd like, but it is temporary storage. To really change the users alias, you would need to write it down somewhere, presumably the database.
Glad you are making progress. That's what we're here for.
You are free to change the session data as often as you'd like, but it is temporary storage. To really change the users alias, you would need to write it down somewhere, presumably the database. Glad you are making progress. That's what we're here for.
A very big THANK YOU for spelling it out for me. I can know that you may sometimes be rolling your eyes over us newbies asking questions all the times, but so far I have had very good response from this forum, which is much appreciated. Here is my final script, where I assign the user index as the session variable, making it possible for the user to change his alias later (could I as well just be using the alias as variable without losing it,...
Caught the last part of Adam M's sql talk on error... Caught the last part of Adam M's sql talk on error handling then Gert D's data dude session. Andrew's SQL trace after lunch. #teched
11:26 AM June 05, 2008
from web
Dealing with more hacker issues on another web site.... Dealing with more hacker issues on another web site. word to the wise: make sure you can handle SQL injection attacks on your ASP/SQL site 7:54 AM May 15th from web
ASP.NET Session mgmt; SQL Server vs ASP.NET Session... ASP.NET Session mgmt; SQL Server vs ASP.NET Session Server. Session Server seems simpler and optimized but any perf. diff? any guide lines? 2:05 PM Apr 9th from TwitterFox
Wishes that plaxo would remember my session (keep me... Wishes that plaxo would remember my session (keep me logged in) as long as linkedin does. logging in again often leads to bounce for me.
12:27 AM May 23, 2008
from twhirl
Thread profile page for "php SESSION - How do I handle SQL data for logged in user??" on http://www.phpbuilder.com.
This report page is a snippet summary view from a single thread "php SESSION - How do I handle SQL data for logged in user??", located on the Message Board at http://www.phpbuilder.com.
This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity