Hey guys this might be just a noob question but in my sql query for the database how do i set it to say like where industry = and then the id number from the url for its query?
@Codeman0013authorSep 20.2006 — #ok another noob question on the dropdowns that are pulling this information when it submits the page they go back to saying please select an industry when it submits the information how do i get it to stay and still say like Analytical?
@JDM71488Sep 20.2006 — #use the option attribute selected and set it equal to selected. [selected="selected"].
if your select options are in a database you can do something like the following. [code=php]foreach($industries as $industry) { if($industry['value'] == $_GET['industry']) { // print option with selected="selected" } else { // print option } }[/code] or you will have to manually check each option value. [code=php]if($_GET['industry'] == "a") { // print option with selected="selected" } else { // print option } if($_GET['industry'] == "b") { // print option with selected="selected" } else { // print option } if($_GET['industry'] == "c") { // print option with selected="selected" } else { // print option }[/code]
@Codeman0013authorSep 20.2006 — #hey also thanks again for all the help could you help me write an if statement for the following code: [code=php]<tr><td>Product category:</td><td>