Hi, I have a form to submit a search query, at the moment I have set the options to printer.printer_model and cartridge.model which are the columns I am selecting data from. This works but I would like to display the options as "Printer Model" and "Cartridge Model" while keeping the values printer.printer_model and cartridge.model. Does anyone know how I can achieve this?
Thanks, Kev
Form Code:
<form action="<?php echo 'searchnew.php'; ?>" method="post">
<select name="stype">
<option>printer.printer_model</option>
<option>cartridge.model</option>
</select><br />
<input type="text" name="keyword" size="8" maxlength="20">
<input type="submit" name="submit" value="go"></div>
</form>
Select Code:
$query = "SELECT * FROM printer, cartridge WHERE $stype LIKE '%$key%'";