I am beginner in PHP. In edit section I have defined a Do-While loop to get the information from data base. But when the user choose from the drop-down and submit the selected item disappears and fist option appears on drop-down. How Can I retrieve and echo selected items after submitting.
<?php
$cat_sql= "SELECT * FROM cars";
$cat_sql_query=mysql_query($cat_sql);
$cat_sql_row=mysql_fetch_assoc($cat_sql_query);
?>
<form action="MSPEditstock.php" method="POST">
<span style="font-size: 18px; margin:10px;">Please Choose your car from the dropdown:</span>
<select id="sortmethod" name="editstock" >
<?php do{?>
<option value="<?php echo $cat_sql_row['id']; ?>" > <?php echo $cat_sql_row['Brand'].$cat_sql_row['Model'];?> </option>
<?php ; }while($cat_sql_row=mysql_fetch_assoc($cat_sql_query))?>
</select>
<input type="submit" value="Start Editting" class="fvisual">
</form>