I have a edit data form .. the "city" field is a list/menu .. How can I make it so it so it uses the "echo" function to show the choice saved in the database rather than the first choice of the menu?
Code: Select all
<table width="40%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form name="address" method="post" action="update_data.php?page=edit">
<table width="100%" border="0">
<tr>
<td><font face="Tahoma">First Name: </font></td>
<td><font face="Tahoma">
<input name="fname" type="text" size="30" value="<?php echo $FirstName; ?>">
</font></td>
</tr>
<tr>
<td><font face="Tahoma">Last Name:</font></td>
<td><font face="Tahoma">
<input name="lname" type="text" size="30" value="<?php echo $LastName; ?>">
</font></td>
</tr>
<tr>
<td><font face="Tahoma">Email:</font></td>
<td><font face="Tahoma">
<input name="email" type="text" size="30" value="<?php echo $Email; ?>">
</font></td>
</tr>
<tr>
<td><font face="Tahoma">Phone No:</font></td>
<td><font face="Tahoma">
<input name="phone" type="text" size="30" value="<?php echo $Phone; ?>">
</font></td>
</tr>
<tr>
<td><font face="Tahoma">Cell No:</font></td>
<td><font face="Tahoma">
<input name="cel" type="text" size="30" value="<?php echo $Cel; ?>">
</font></td>
</tr>
<tr>
<td><font face="Tahoma">Fax No:</font> </td>
<td><font face="Tahoma">
<input name="fax" type="text" size="30" value="<?php echo $Fax; ?>">
</font></td>
</tr>
<tr>
<td><font face="Tahoma">Street No:</font></td>
<td><font face="Tahoma">
<input name="no" type="text" size="5" value="<?php echo $No; ?>">
</font></td>
</tr>
<tr>
<td><font face="Tahoma">Street:</font></td>
<td><font face="Tahoma">
<input name="street" type="text" size="30" value="<?php echo $Street; ?>">
</font></td>
</tr>
<tr>
<td><font face="Tahoma">City:</font></td>
<td><font face="Tahoma">
<select name="city">
<option>Australia</option>
<option>Canada</option>
<option>US</option>
</select>
</font></td>
</tr>
<tr>
<td colspan="2"><div align="center"> <font face="Tahoma">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="submit" name="Submit" value="Submit">
</font></div></td>
</tr>
</table>
</form></td>