php_guy Posted February 12, 2011 Share Posted February 12, 2011 I have an ordering process that consists of 3 pages: 1) Page1: Enter name/address 2) Page2: Based on address, determine availability of products, and let user choose which products, how many, etc. 3) Page3: Enter credit card info to send to the processor What is the best way to store information fro page 1 to page 2, then from page 2 to page 3? I thought about just using hidden fields. Is this OK? Is there another preferred way? Thanks! Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted February 12, 2011 Share Posted February 12, 2011 sessions. hidden fields can be manipulated MUCH easier than session data. you'll be using sessions to track the user through multi pages anyway, so you can keep their info in session variables OR store to database in case they leave without completing portions. Quote Link to comment Share on other sites More sharing options...
php_guy Posted February 12, 2011 Author Share Posted February 12, 2011 sessions. hidden fields can be manipulated MUCH easier than session data. you'll be using sessions to track the user through multi pages anyway, so you can keep their info in session variables OR store to database in case they leave without completing portions. Ahhhhh I KNEW there was a cleaner way than just hidden fields How secure are sessions? And would it just be a matter of doing: $_SESSION['myfield'] = myvalue? Besides the user clicking the close button of the browser, when are session variables destroyed? Thanks Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 12, 2011 Share Posted February 12, 2011 And would it just be a matter of doing: $_SESSION['myfield'] = myvalue? Besides the user clicking the close button of the browser, when are session variables destroyed? 1. I'd do $_SESSION['formname']['myvalue'] because you'll probably have other stuff in your session. 2. When you choose to destroy them http://us2.php.net/manual/en/book.session.php Quote Link to comment Share on other sites More sharing options...
php_guy Posted February 12, 2011 Author Share Posted February 12, 2011 Makes perfect sense Thanks a bunch! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.