I have a drop downmenu on a page, after users add a content to the db,
i do not want the specific value that was added
from the dorpdown menu to show in the list again.
I do not want to delete that specific value from the dropdown table.
Your help will do.
Here is my code below:
`<?php
$query = "SELECT * FROM vreg_no order by vreg desc";
$rs = mysql_query($query);
while($row = mysql_fetch_assoc($rs))
{{
$_SESSION['svregx'] = $row['vreg'];
}}
?>
<select name="svreg" class="bodytxt" id="svreg">
<option>Select Vehicle #</option>
<?php
$query = "SELECT * FROM vreg_no order by vreg desc";
$rs = mysql_query($query);
while($row = mysql_fetch_assoc($rs))
{{
$vreg = $row['vreg'];
if($_SESSION['svregx'] == $vreg){
//do nothing
}
elseif($_SESSION['svregx'] != $vreg){
echo"<option value='$vreg'>$vreg</option>";
}else{}
}}
?>
</select>`