sildona Posted October 26, 2012 Share Posted October 26, 2012 I have a file that calls 3 columns (3 products) from a database. Once the information displays, I cannot figure out how to have each column have it's own dropdown menu with some options. Below the dropdown menus, there would also be a "submit" button to process the page and forward the visitor to another page. I know how to forward the visitor (location...) I know how to carry the session forward Basically, it seems as if I would have to 1. call the 3 columns into an HTML form -- do I place the PHP page-loading code into a form frame, so that the information is in the form ??? 2. have a drop-down menu appear (or already be in the form) and somehow the 3 columns would each be assigned variables = to those of the drop-down menus (???) 3 have a submit button that would carry the form information to a thank you page while updating the database wit the options selected in the dropdown menus I'm getting confused on this... I don't need sample code ... but if someone could give me the logic / steps necessary to accomplish this and the names of the commands they would use, I could pour through my books and code it. Any help anyone might give -- MUCH APPRECIATED! Thanks! Link to comment https://forums.phpfreaks.com/topic/269926-select-button-beneath-items-called-from-database/ Share on other sites More sharing options...
Muddy_Funster Posted October 26, 2012 Share Posted October 26, 2012 Best way would be to have the form created dynamicly by the php code. here's a summary of how I'd suggest you do it : 1- Have php query for the database 2- Grab the product headings from the query into either an array or series of variables 3- Loop through results of the query, assigning each value to a variable that contains <option> elements relevent to a <select> element based on the product heading you just got 4- build the form using the array and/or variables that you have built 5- echo / print onto page Hope that helps. Link to comment https://forums.phpfreaks.com/topic/269926-select-button-beneath-items-called-from-database/#findComment-1387893 Share on other sites More sharing options...
sildona Posted October 26, 2012 Author Share Posted October 26, 2012 Thanks!! I'll work on it!! Link to comment https://forums.phpfreaks.com/topic/269926-select-button-beneath-items-called-from-database/#findComment-1387918 Share on other sites More sharing options...
Muddy_Funster Posted October 26, 2012 Share Posted October 26, 2012 You're welcome, good luck. Link to comment https://forums.phpfreaks.com/topic/269926-select-button-beneath-items-called-from-database/#findComment-1387919 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.