Yes, it is possible.
You could do it several ways. The first way would be to populate the link like this:
Code:
<a href="[add/delete form script]?action=delete&record=[record number]
</DIV><DIV> </DIV><DIV>Another way to do it would be to have a "submit" button that has a value of "Delete":
Code:
<form action="[add/delete form script]" method="post">
<input type="hidden" name="record" value="[record number]" />
<input type="submit" name="submit" value="Delete" />
</form>
Then at the top of your add/delete form script you would test for a value of $_POST['submit']. If this has the value of "Delete" you would retrieve the record number this way:
PHP Code:
$record = $_POST['record'];
// Then you would execute your query here
mysql_query( "DELETE FROM [table name] WHERE userId = '$userId' AND recordId = $record");
This is, of course, quite sketchy, but hopefully it will give you a bump in the right direction.
Bookmarks