Jump to content

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
https://forums.phpfreaks.com/topic/220598-mysql_field_name-drop-down-menu/
Share on other sites

Thanks for reply.  Sure, so picture attached.  What I need to happen.. two drop down boxes, one that lists characters, another that lists game play functions.  (Essentially I am trying to battle two characters).. (This is for a class).  Similar to: http://thesurrealist.co.uk/monster

 

 

 

 

 

[attachment deleted by admin]

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.