Hello,
I have a page containing 5 links, each link has a different ID number at the end. (Shown in Bold)
http://localhost/Memory.php?action=add&id=1
http://localhost/Memory.php?action=add&id=2
http://localhost/Memory.php?action=add&id=3
http://localhost/Memory.php?action=add&id=4
http://localhost/Memory.php?action=add&id=5
Each time a link is clicked, how do I add the id at the end of each link, to an array? But, if array already contains that particular ID, how do I display a message notifying the user e.g. "Already Added!"
Once in the array, how do I output the items in the array to the screen, along with a remove button.
Upon clicking the remove button, how do I delete the appropriate id from the array. The remove link will be in the form of the following:
http://localhost/Memory.php?action=delete&id=1
http://localhost/Memory.php?action=delete&id=2
http://localhost/Memory.php?action=delete&id=3
http://localhost/Memory.php?action=delete&id=4
http://localhost/Memory.php?action=delete&id=5