Code: Select all
if(!$result = mysql_query($sql))
{
echo mysql_error();
}
can be condensed to simply
Code: Select all
$result = mysql_query($sql) or die (mysql_error());
This is much more helpful because it terminates the scripts execution. After all is pointless to have your scripts running with false queries.
Next, in this snipplet of code:
Code: Select all
<? while($wresults = mysql_fetch_array($result))
{ ?>
<option value="<? echo $wresults["Del_ID"];?>"><? echo $wresults["Del_LName"];?>, <? echo $wresults["Del_FName"];?></option>
<? } ?>
you are setting $wresults in the rowset of your query, but you are accessing this row `Del_Email` using $result
Not to mention that that last line of code is outside the loop, therefor your going to get the data of the very last row.
Not even sure what your trying to do here
Code: Select all
if($result = mysql_query($sql))
?>
Why are you trying to query the data again?