PHP Session to store user data across pages
I have an online ordering page where users input there data (name, number, address etc). Just before the user clicks "Pay", there is a box where they must tick to accept my terms and conditions. There is also a link to view my terms however if they click this, when they return to the ordering page (using the back button on the browser or by a link at the bottom) the data they have typed is gone.
I have read about using variable sessions to store the data across pages.
Is this the best route to go down?
Thanks very much for reading and for any help offered.
Kind regards, Mike
Probably you can use session variables to keep those data. But I think it would be a workload for you. I suggest to open a new page once the terms have been click. Just like this one https://www.google.com/accounts/NewA...aaf4f4c&type=2
Make the link target="_blank"
There is also a link to view my terms however if they click this, when they return to the ordering page (using the back button on the browser or by a link at the bottom) the data they have typed is gone.
about 10 times easier. I guess you could use a session, but you'd have to use some ajax and onchange/focus tags for your elements.
If you're storing sensitive data in a session, I would suggest you change the path to something you can control. That way other users are not reading the data you store in your session or hijacking the sessions that belong to your users (if you're on a shared host). It's not uncommon for shared hosts to be configured where the session is saved to a publicly readable directory by default.
Last edited by eval(BadCode); 03-02-2011 at 09:31 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread