if(isset($_GET["id"])){
$sql=mysql_query("SELECT * FROM aMovie WHERE aName= '{$_GET['id']}'");
$row=mysql_fetch_object($sql);
}
<input type = "text" name = "name" value = "<?php echo $row->aC; ?>"/>
<select name = "name" >
<option value = "" <?php echo ($row->aC== "Deadpool") ? 'selected = "selected"': '';?>">Deadpool</option>
<option value = "" <?php echo ($row->aC == "BATMAN VS SUPERMAN") ? 'selected = "selected"': '';?>">BATMAN VS SUPERMAN</option>
</select>
Assume that aMovie is my table name, and in my table there are aName and and aC. However, I would want to display aName which matches aC ["Deadpool" or "Batman Vs Superman"] and display it in the drop down button. It only works for the input type but not the drop down button.