I've created a While loop that prints out the info of a MySQL table into a simple html table. This part works just fine.
I've created a variable which has a prefix tableID and then adds the number of the row ID. ID is the primary key and row is the array.
${'tableID_' . $row['ID']} = $row['ID'];
In the While loop table I've also included form checkboxes, so if it's checked and the submit button is hit, it will delete the row from the table. I've named the checkbox the same as the variable as well as giving it the same value.
<input name=\"${'tableID_' . $row['ID']}\" type=\"checkbox\" value=\"${'tableID_' . $row['ID']}\">"
In the script that processes the delete query, I tried doing this for the variable:
$tabRowDel = $_GET[${'tableID_' . $row['ID']}];
The error is: "Notice: Undefined index: 1 in..." The above is on the line number it tells me the error exists.
I did have it as POST before but decided to try GET to see if it was working at all. It does pass into the URL.
Any ideas on how to get this working? While I'm at it, what's a good way to do a verification? Essentially someone checks the box, hits Submit and a message asks if they really want to delete the info.
Cheers!