combo box

A

Anonymous

Guest
Hi,

If you want to display data in a combo, it is not in the "value" property, but something like:

<option value="whatever"><?php echo $row['value'];?></option>

Usually, the value is also extracted from the db.

Regards.
 
please be sure that the column name that you use in $row['col_name'] is case sensitive.
 
you are have a syntax error
change echo string at this:

echo "<option value=\"$row['myRow']"></option>";
or this:
echo "<option value=\"" . $row['myRow'] . "\"></option>";
 
Just watch out for that empty value (value=""). If you later want to do something to the selection of the combo, then each option in the combo should have a different value...

Regards.
 
betomachado said:
...............
echo '<p><option value="">'.$var1.'</option></p>';
...............
If true I'm not use <P> tag inside SELECT. what for?
echo '<option value="">'.$var1.'</option>'. "\n";
 
Back
Top