Your code is a mess. I don't really want look at it, but...
1. Your select box should look like this :
html
<select size ="10" name="deluser" style="width:150" class=NormalFont>
<option value="0">-Select User from List-</option>
<option value ="1">JDoe </option>
<option value ="3">WSmith </option>
<option value ="2">MJohnson </option>
</select>
... where the values of the option is uid. You get get this adding uid to the select statement :
sql
$sql="select uid, concat(left(firstname,1),lastname) as username from adduser order by firstname;";
After this you have to put the uid in the form:
php
<option value =" <?php echo $row['uid']; ?>"><?php echo "$username";?></option>
After these steps you'll get post variable like this $_POST['deluser'] which will point to the user id you want to delete. The delete query is simple:
sql
$query = "DELETE FROM adduser WHERE uid='$_POST[deluser]'";
I strongly recomment you reading some basic HTML ( forms ) and PHP/MySQL tutorials.
This post has been edited by MitkOK: 21 Jul, 2008 - 02:25 PM