Appending to remove POST array on delete
Appending to remove POST array on delete
Is there a method for appending to the (delete functionality) remove POST array on the editor api? I've tried presubmitting and setting a variable but it does not work as it always ends up empty.
The issue is I have an array that sends the right data through the delete method but I don't have a way to reference the correct id in the database. So the array is being referenced in the POST array as follows. $_POST['data'][257] I can't access it unless I have a specific way of referencing each row that gets sent over which is why I'm wanting to send over a unique id or the DT_RowId. Any help is appreciated.
This question has an accepted answers - jump to answer
Answers
I figured this out. I got the value of the key in the array by using the following code via server side (php)
foreach ($_POST as $key => $value) {
if ($key == 'data') {
$mykey = array_keys($value);
$autoinc = $mykey[0];
}
}
Hi,
Yes, that's the perfect way to do it. Thanks for posting back!
Allan