March 11, 201016 yr Morning guys I'm learning php and mysql and i'm taking it one step at a time, i think i'm now starting to understand it a little. I have setup a drop down list working correctly, it takes me to different pages depending on what the user selects but it's for a e-commerce site and i need a database, so I think i've now figured out how to setup a database and have that drop down list display contents from my database instead of me putting it in the html code. Can i assume that I can leave how the pages redirect as they are as all that's changing is how that list is getting the information and how do i record/save what had been selected from the drop down lists 5/6 pages further down the line i.e a checkout page?
March 11, 201016 yr If you put the information in a Session Variable, you will be able to retrieve it any time in the future untill the clients session ends. You can set the time before a session variable dies. See here http://www.php.net/manual/en/book.session.php
March 12, 201016 yr you can also use hidden fields, that way if cookies are disable it still works, or if it is not sensative information store it in the URL that way the user can bookmark the page after the selection is made
Create an account or sign in to comment