Hi, I'm trying to create a drop down menu with dynamically populated options.
So, within a typical HTML form I have:
$conn = mysql_connect ("localhost", "xxxx", "xxxx");
mysql_select_db ("wkho_TTX", $conn);
$query = "SELECT * FROM venues";
$result = mysql_query($query) or die(mysql_error());
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$option = mysql_result($result,$i,'vname');
echo '<option value='.'$2option'.'>.$1option.</option>';
$i++;
}
I think the problem is with the echo line, but can't format it to show the value of option.
Can anyone help please?