Is there anyway that i can make the code i have with another for loop that creates the actual select box for each column title?
I have the forloop in place for the information in the database but not for the column titles
</select><br>
<label for="FO">Footrest Options: </label>
<select name="FO">
<option>----</option>
<?
foreach ($liftsecond as $lift){
echo '<option>'.$lift["Footrest Options"].'</option>';
}
?>
</select><br>
<label for="SW">Seat Width: </label>
<select name="SW">
<option>----</option>
<?
foreach ($liftsecond as $lift){
echo '<option>'.$lift["Seat Width"].'</option>';
}
?>
</select><br>
<label for="SS">Seat Style: </label>
<select name="SS">
<option>----</option>
<?
foreach ($liftsecond as $lift){
echo '<option>'.$lift["Seat Style"].'</option>';
}
?>
</select><br>
For instance, where I have:
<select name="FO">
<option>----</option>
Is there any way of querying my database to retrieve the column names and loop through them and create select boxes as necessary?
Thanks