# Create list with delete funtion - HELP!

**URL:** <https://forum.kirupa.com/t/create-list-with-delete-funtion-help/156654>\
**Category:** Uncategorized\
**Created:** [July 27, 2005, 8:48am UTC](https://forum.kirupa.com/t/create-list-with-delete-funtion-help/156654 "2005-07-27T08:48:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azazel](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Azazel](https://forum.kirupa.com/u/Azazel)\
**Post date:** [July 27, 2005, 8:48am UTC](https://forum.kirupa.com/t/create-list-with-delete-funtion-help/156654/1 "2005-07-27T08:48:21Z")

</div>

GOING InSanE :stare:

I don’t know what’s wrong with this code??

```php

<?php include("secure_it/dbconnect.php")?>
<form action="<?php echo $PHP_SELF; ?>" method="POST" name="del" id="del">
<? 
		$id=$_GET["id"];
		$name=$_GET["name"];
		$result = mysql_query("select * from tester order by id");
		$n = mysql_fetch_array($result);
?>
		<select name="name" size="7" multiple="multiple" class="textforForms2">
		<option value="<?php echo $n["name"]?>"><?php echo $n["name"]?>
		</select>
		<br/>
		<input name="cmd" type="submit" class="btn" value="remove" />
<?
		if($_POST["cmd"])
	{
		$sql = "DELETE FROM tester WHERE id=$id";
		$result = mysql_query($sql);
		echo "Tada... IT WORKED!";
	}
?>
</form>

```

It only displayed the first name… i need it to display ALL the names in that table…

ANYONE… PLEAS… HELP ME 😟
