I'm trying to dynamically populate a select drop down box with the following code but it keeps giving me an error similar to the following:
expecting T variable, T string, etc..
The error occurs on line 21 where I assign the variables values for the rows. Here is the code I'm using to pull from a table:
<?
$db = mysql_connect("localhost", "einteract", "7777777");
mysql_select_db("einteract",$db);
$sql="SELECT f_name,l_name FROM model_info";
$result=mysql_query($sql,$db);
$num = mysql_num_rows($result);
$cur = 1;
echo "<select name=\"select\">;
while ($num >= $cur) {
$row = mysql_fetch_array($result);
$f_name = $row["f_name"];
$l_name = $row["l_name"];
<option>$f_name $l_name</option>
$cur++;
}
echo "</select>";
?>