could some help me . as i want to know how to delete last record.
currenlty the code im using its based on two different pages, one for update/display record and second for deleting record.
but sum reason this code not working for me .
$authorname = trim($_POST);
$publishyear = trim($_POST);
$booktitle = trim($_POST);
$edition = trim($_POST);
$place = trim($_POST);
$publisher = trim($_POST);
// insert into table name?
$query = "INSERT INTO book (id, authorname, publishyear, booktitle, edition, place, publisher)
VALUES ('', '$authorname', '$publishyear', '$booktitle', '$edition', '$place', '$publisher')";
$results = mysql_query($query);
echo "<br/><br/>Your book reference is :<br/>";
echo "$authorname, $publishyear, $booktitle, $edition, $place, $place, $publisher ";
// delet query
echo '<a href="deleted.php?id='.$row.'">Delete</a>';
/* for delete record */
$id = $_GET;
$delete = "DELETE FROM book WHERE id = '$id' ";
echo "Entry deleted";
pls help me to correct this pice of code ... or if you know any other commend for deleting last record.