I have the following code which grabs link data from a mysql database:
$db_connect = mysql_connect ( 'localhost', 'knight', 'password' )
or die ( 'Unable to connect to database!' );
mysql_select_db ( 'scriptparadise_net', $db_connect )
or die ( 'Unable to select database!' );
$query = "SELECT * FROM links";
$results = mysql_query ($query)
or die ( 'Unable to execute query!' );
while ( $row = mysql_fetch_assoc( $results ))
{
$name = $row["NAME"];
$link = $row["LINK"];
}
with this code I want to create a pull down menu which displays the names from $name and sets the link values from $link but I'm not quite sure how I go about writing the code for that task. I'd be greatful for any tips.