I have a "Make" combo box. In this combo box, I upload the names of the car manufacturers. When I press the SEARCH button, I want to display the selected manufacturer name. The following is part of my HTML code.
<label for="Manufacturer"> Manufacturer : </label> <select id="cmbMake" name="Make" > <option value="0">Select Manufacturer</option> <option value="1">--Any--</option> <option value="2">Toyota</option> <option value="3">Nissan</option> </select> <input type="submit" name="search" value="Search"/>
Below is my PHP code so far I have done.
<?php if(isset($_POST['search'])) { $maker = mysql_real_escape_string($_POST['Make']); echo $maker; } ?>
If I select Toyota from the combo box and press the SEARCH button, I get the answer as "2". This means that it gives me the value of Toyota. But I want to show the name Toyota. How can i do this? Please help me....
source share