Just grabbed some examples from the net, since there are plenty to be found.
Inserting values into your table:
// Insert a row of information into the table "example"
mysql_query(
"INSERT INTO example
(name, age) VALUES('Timmy Mellowman', '23' ) ")
or die(mysql_error());
Retrieve all the data from the "example" table
$result = mysql_query("SELECT * FROM example")
or die(mysql_error());
store the record of the "example" table into $row ($row becomes an array with all data selected)
$row = mysql_fetch_array( $result );
// Print out the contents of the 1st row
echo "Name: ".$row['name'];
echo " Age: ".$row['age'];
But you want to create a pulldown with the results.. so you want to make a loop and so create your pulldown.
$selectAry = '';
while($row = mysql_fetch_array( $result ))
{
$selectAry .= '<OPTION VALUE="' . $row['age'] . '">'. $row['name'] .'</OPTION>';
}
echo '<SELECT NAME="">'. $selectAry .'</SELECT>';
Hope this will get you on your way to become an expert ;-)
PS. Don't forget to close the thread when your answer has been answered.