When the user comes back to edit their info in this form, I want the year they originally chose to be echoing up there. Right now, it is displayed correctly in the database, but I cannot get it to echo on the page. I cannot figure this out, any ideas?
<form action="pad.php" method="post" enctype="multipart/form-data">
<center>
<table class="loginTable">
<tr>
<td>PRICE</td><td><input type="text" name="price" value="<?php echo $line_B['price'];?>" /></td>
</tr>
// THIS IS WHERE I AM HAVING THE PROB.
<tr><td>YEAR</td><td><?php include ("yearList.php"); ?>
// yearList.php includes the drop down box of options w/ the select name of ‘year’
<? if(isset($_POST['year']))
{
echo "<option selected value=\"".$_POST['year']."\">".$_POST['year']."</option>";
}
?>
</td></tr>
<tr>
<td>PLACE YOUR AD</td><td><textarea name="ad"><?php echo $line_B['ad'];?></textarea></td>
</tr>
<tr>
<td>PHOTO</td><td><img src="view.php?id=<?php echo $line_B['adid'];?>" height="100" width="210" /><br /><input type="file" name="photo" /></td>
</tr>
<tr>
<td>ACTIVE</td><td><input type="checkbox" name="active" <? if ($line_B['active'] == '1') {echo "checked=\"checked\" ";} ?> /></td>
</tr>
<tr align="center">
<td colspan="2"> <input type="submit" class="button" value="Submit" /></td>
</tr>
</table>
</center>
<input type="hidden" name="do" value="updatead" />
<input type="hidden" name="adid" value="<? echo $line_B['adid']; ?>" />
</form>