I have been trying to understand $_SESSION
& $_COOKIE
variables. I was first trying to use both together. I have been trying to get them to both work, I guess the session would throw off the cookie ID or vise-versa, anyway can you use cookies and sessions together for the same purpose to be more failsafe?
I have login script pick up on confirmed user to logged in page we she/he (user) can see specific record of their database record row. Now, from here is a link that will take them to an order page, now where sessions/cookies (sessions I assume) being passed after the array is initially set...how do I pull up the passed session and allow them to still hold that database connection to their file so they can order and add data to it, or do I need to connect again to the database? Tried from user={$_SESSION['user_id']};
but no works in MySQL command statement.
Using COOKIES AND SESSIONS together at ONCE in script, is it possible. If someone leaves the shopping cart and comes back no info saved from SESSION and COOKIE would save this, HOWERVER safe to DESTROY the SESSION after ALL EXITS to CLEAR anything personal, etc...and at the same time cookie would save info. THE POINT HERE WOULD BE FOR COOKIE TO SAVE DATA AND THEN SESSION WOULD DESTRY COOKIE AND SESSION AFTER SOME POINT.