Jump to content

mysql_field_name, Drop Down Menu


CEinNYC

Recommended Posts

Hi all -

 

I'm trying to populate a drop down menu, and the items listed on the drop down menu are four of the field titles (names).  Here's what I am playing with....  "intelligence" "speed" "power" and "reserve" are field names (and a series of numbers are stored in each field).  (picture of database attached).

 

How do I incorporate mysql_field_name into the mix?   

 

 

   

  <select name="id" style="">

<?php while($row = mysql_field_name($options)):?>

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

<?php echo $row['power']." ".$row['intelligence']." ".$row['speed']." ".$row['reserve']; ?> </option>

<?php endwhile; ?>

</select>

 

 

Thanks for any advice!  Attached is a screen shot of the database.

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.