I have code to propagate a drop down list that displays people's names. The problem is that the first name and last name are separate fields in the database, and I can only get the drop down list to display one of them. Here's my code:
<?php
$result = mysql_query("SELECT id, `first`, `last` FROM agents ORDER BY agents.id");
?>
<form name="Events" method="post" action="<?php echo $php_SELF;?>">
<table width="500" border="1" align="center" cellpadding="4" cellspacing="0">
<tr>
<td width="200" align="left">
<select name="Person" id="Person">
<option selected>Select</option>
<?php while ($row = mysql_fetch_array($result)){?>
<option><?php echo $row['last'];?></option>
<?php }?>
</select>
</td>
</tr>
</table>
</form>
If I run this in my browser, I get a list of last names. How can I get both the first names and the last names?
Thanks