Oh..you arent using databases 🙁 I'm not too sure then (im new to php and html too 😛)
one thing that i can think of is setting up a session variable that is an integer that just keeps track of which form you are on (i see that you are making a different form each time an item is added...although im not sure why, you may want to explore the wonderful world of javascript...i was hesitant at first to introduce another language into my stuff, but it is GREAT and pretty easy 😛)
Actually now that I think about it, you are going to have to use javascript lol...
but anyways, make a form that has the same number as the button (on the same form...)
ie form1 - button1
form2 - button2
...if you dont know how to use session variables, they are pretty easy.
up at the VERY top of your code add
<?php
session_start();
?>
and then just start the variable at 0 (using $_SESSION['entryNumber'] = 0) and then each time you make a new form, name the form
name ="form<?php echo $_SESSION['entryNumber'];?>"
and do the same for the button
after each time increment the session value $_SESSION['entryNumber'] ++;
Hope this is right...and helps...might give you an idea how to start it...but in terms of deleting entries, you are going to have to explore javascript..
Paul