<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//NL">
<HTML>
   <HEAD>
      <TITLE>
      Bottom
      </TITLE>
   </HEAD>
<BODY>
<CENTER>

<?php
   if ($_POST['submit']) {
       $nameid = $_POST['id'];
       include ("config.php");
       $db = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());
       mysql_select_db($dbname) or die(mysql_error());
       $query = "DELETE FROM names WHERE id = '$nameid'";
       mysql_query($query) or die(mysql_error(ERROR));
       mysql_close($db);
       print "Record with ID: $nameid has been deleted.\n";
   } else {
?>
<CENTER>
<form action="names-del.php" method="post">
 Please give the ID of the record you want to delete.<br>
 <br>
 ID:
 <input type="text" name="id" size="3">
 <br> <br>
 <input type="submit" value="Delete" name="submit">
</form>
<?php
   }
?>

</CENTER>
</BODY>
</HTML>
