I'm creating an banner management tool which uses an SQL database to store its data once added. there is a tab which shows for every banner in this database an update and delete button. These buttons are created in a PHP based loop so i will have X amount of update and delete buttons.
Now depending on which button i press i will go to an update vieuw of the the item wherunder the update button was clicked.
The problem i encounter since these buttons all have the same name is that i can't distinguish which button has been pushed. Every item in the DB has en ROWID, however i can't figure out how to get the ID once u push the button...
Here is the code of how these buttons are generated.
do {
$entry = $dbase->querySingle("SELECT name FROM banners where ROWID='$currentRowNumber'");
echo "<tr>";
echo "<td width=\"50\">". $entry ."</td>";
echo "</tr>";
echo "<tr>";
echo "<td><input type=\"submit\" name=\"operation\" value=\"Update\"></td>";
echo "<td><input type=\"submit\" name=\"operation\" value=\"Delete\"></td>";
echo "</tr>";
$currentRowNumber++;
} while ($dbase->querySingle("SELECT name FROM banners where ROWID='$currentRowNumber'") != NULL);
I was wondering if anyone has any idea on how to distinguish these buttons. Maybe a hidden factor that i can read out below? (don't know if such a thing exists)
Regards