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! Link to comment https://forums.phpfreaks.com/topic/227479-order-form-spread-across-multiple-pages/ 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. Link to comment https://forums.phpfreaks.com/topic/227479-order-form-spread-across-multiple-pages/#findComment-1173355 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 Link to comment https://forums.phpfreaks.com/topic/227479-order-form-spread-across-multiple-pages/#findComment-1173359 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 Link to comment https://forums.phpfreaks.com/topic/227479-order-form-spread-across-multiple-pages/#findComment-1173364 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! Link to comment https://forums.phpfreaks.com/topic/227479-order-form-spread-across-multiple-pages/#findComment-1173366 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.