Jump to content

Display column from database in dropdown


anton_1

Recommended Posts

Thanks for your time guys:

 

 

 

$data = @mysql_query("select * from names");

echo "<p>Select a Name: n";

echo "<Select Name="ID">n";

while ($row = mysql_fetch_assoc($data))

{

$ID = $row['ID'];

$year = $row['name'];

echo "<option value=$ID>$namen";

}

echo "</select>n";

echo "</p>n";

 

Archived

This topic is now archived and is 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.