Hi, I'm fairly new to PHP and I'm having difficulties displaying the MakeModelID for a row selected from a drop down menu I've populated from a table combining three attributes (Make, Model and Specification - for example Ford Transit LWB 350 HR). What I require is to capture in a variable, such as $MakeModelID, the ID for that record selected.
<fieldset>
<legend>Please select the Type of Van</legend>
<?php
$result = mysql_query("SELECT MakeModelID, Make, Model, Specification FROM MakeandModel ORDER BY Make, Model, Specification");
?>
<label for="branch">Type of Van:</label>
<select name="vantype" STYLE="width: 220px" size="0">
<option selected value=""></option>
<?php
while ($row = mysql_fetch_array($result)) {
echo "<option value=\"$row[MakeModelID]\">$row[Make] $row[Model] $row[specification]</option>\n";
}
?>
</select><br>
</fieldset>
Any help would be much appreciated. Thanks! Alex