I have a home.php through which i send some data which gets inserted into DB, which is done by making an ajax call to another php page, lets say function.php and a unique id is generated against the entry and stored in a variable $id.
When the user leaves the home.php page I want to delete the particular entry that was inserted into the DB, by making another ajax call to same function.php, but the problem is that the $id that was previously generated is lost as function.php is reloaded. Declaring a global in home.php doesn't work.
Any idea how can I store the id, so i can retrieve it, when needed.
Some code would be great.
Abhi