I am developing an update form where I would like to have the first field be a list menu which searchs for all the coursenames that are present in a table called trainingtopics. I have the bulk of the code (below) but at the moment im not sure what code to put in the select name tags below- thanks in anticipation. By the way I have done a search but got very confused.
<select name="select">
</select>
<?php
$user = "root";
$host = "localhost";
$password = "";
$connection = mysql_connect($host, $root, $password) or die ("Couldn't connect to server.");
$database = "courses";
$db = mysql_select_db($database) or die ("Couldn't select database.");
$sql = "SELECT coursename FROM trainingtopics";
$result = mysql_query($sql) or die(mysql_error());
echo $result."=result<br>";
while($row=mysql_fetch_array($result))
{
}
?>