I would like to pass php parameters to an html select options tag. it works fine for an input tag using the value attribute as follows:
<input type="text" name="to" value= "<?php echo $parameter ?>" size=10>
I tried to do the same for the select tag, but some reason its not working. Below is the select tag:
<select name="clinic">
<option value="<?php echo $clinicName; ?>" >Baylor</option>
<option value="<?php echo $clinicName; ?>" >IDCC</option>
</select>
Please note that the parameter would need to passed to an sql statement below these above statements as follows:
$clinicName = $_POST['clinic'];
$sql = "select * from patients where clinic = '$clinicName'";