OK,
I'm wanting to use two drop down menus populated from the database on one page. Can someone please help out here. I've got the code to do the one but when I try to incorporate another select statement it blows up. I've searched the web and can't seem to find an answer. I'm also wanting to put check boxes that are populated for the db on this same page. Is this impossible?
What I'm trying to accomplish here is the ability to customize a trailer based on what selection criteria the user chooses. I want a drop down menu (or radio button) for Trailer, Axle, wheels -> they have multiple to choose from but can only choose one. Next I would like to have checkboxes for the accessories as they can choose many. On the next screen I plan to display what the user has selected and bring price with it in the "value" options and have everything they selected and the total of what they picked. Kinda like a store front but different ;0
here's what I got so far... please help
if you know a better way to tackle please let me know.
<form method=get action="next_page.php">
<select name="option">
<?php
$server = 'blabla';
$username = 'blabla';
$password = 'blabla';
$db = 'blabla';
$conn = mysql_pconnect($server, $username, $password)
or die("unable to connect to the server");
mysql_select_db($db) or die("Could not find database '$db'");
$query = "select * from custombuild where product_type='Axle'";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
extract($row); // Get fields as variables
echo "<option value='$price'>$description, $price</option>\n";
}
mysql_free_result($result);
?>
</select>
</form>