PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a shopping cart using session, when a new user adds products to the cart and proceeds to the checkout they need to create and account before they can continue. With the membership system after they signup they then get an email asking them to activate their account, therefore opening a new browser their cart data will be lost.
Also how is it done so when they continue to the cart and need to login, have it so after login they are redirected back to the checkout page using header() ?
What may have happened is PHP garbage collected the session, perhaps. Ensure the SID identifier is properly outputted into the email link you are sending. Then do a test, navigate to your sessions folder (you can find this with phpinfo()), delete all the sessions, ensure no one else is using the system while you perform this test, run through your script and then check to see PHP created the session, close your browser window, then click the link in your email verifying that the SID was sent in the URL correctly, make sure the session is still there. If it is not, try making a custom save_handler for your sessions to ensure they do not get cleaned out too often, if it is still there, it is a problem with your code in which case we cannot help you without more information.
Also, what feyd was trying to say is store the session id with the shopping cart information, and require the user to login before trying to match session id's
I have been trying to have it so when a member logs in, it takes them back to the page prior to them logging in. All the pages that may ask them to login contain require 'login.php'; except the login link itself.
How is this done, same as when go to post in a forum, it takes you to the login page then after successfull login it takes you to the page where you add your post.
So, to verify that the session is being destroyed, refer to my fist post, you can change the session save path to something within your access temporarily using session save path. If the session is being destroyed you will need to take the steps using a save handler like I outlined in my first post