Hello I have a dropdown menu which holds items from my database when the submit button is pressed the menu item is not retained instead it resets back to what it started initially.
I read a couple of posts about the subject but my case is specific I am not sure where I should insert the selected attribute.
<form name="upServForm" action="" method="post" >
<?php
$dropdown = "<select name='codes'>";
while($row = mysql_fetch_assoc($result2))
{
$dropdown .= "\r\n<option value='{$row['sid']}'>{$row['sid']}</option>";
}
$dropdown .= "\r\n</select>";
?>