"; } elseif ($delete) { // delete a record $sql = "DELETE FROM employees WHERE id=$id"; $result = mysql_query($sql); echo "$sql Record deleted!

"; } else { // this part happens if we don't press submit if (!$id) { // print the list if there is not editing $result = mysql_query("SELECT * FROM employees",$db); while ($myrow = mysql_fetch_array($result)) { printf("%s %s \n", $PHP_SELF, $myrow["id"], $myrow["first"], $myrow["last"]); printf("(DELETE)
", $PHP_SELF, $myrow["id"]); } } ?>

ADD A RECORD

First name:
Last name:
Address:
Position: