Hi,
Anyone tell me why this is not appearing as an option dropdown?
Ta
Chris
[code=php]
<?php
// access the motors database;
$Host = “localhost”;
$User = “”;
$Password = “”;
$DBname = “”;
$connection = mysql_connect($Host,$User, $Password);
$Result = mysql_db_query($DBname,$Query,$connection);
//set up the query
$query = “select profiles.profilesid, profiles.secondname from profiles”;
//run the query
if(!$connection) { die(‘Eek’); }
$result = mysql_query($query, $connection) or die(mysql_error());
//The following lines return the results from the query and assign them to variables
while($row = mysql_fetch_array($result)){
$secondname = $row[‘secondname’];
$profilesid = $row[‘profilesid’];
//This line prints out the HTML Code with the returned data
echo “<option value=’$profilesid’>$secondname</option>”;
};
mysql_free_result($result);
?>