This is really throwing me for a loop. Here is the code for deleting multiple records from a checkbox. After a successful delete I just want to refresh the page so the header is just pointing to the same page.
PHP Code:
<?php
// Check if bizCat delete button active, start this
if(isset($_POST['delete'])) {
$ids = implode(', ', $_POST['checkbox']);
$sql = "DELETE FROM userBizCats WHERE id IN($ids)";
$result = mysql_query($sql);
if($result){
$pgID = $row_pageRS['id'];
header("location: editUsers.php?recordID=$pgID");
exit;
}
}
?>
This same code is in two pages. On one page I get the expected behavior. On the other page I'm thrown this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/content/12/9413312/html/admin/editPvtPage.php:277) in /home/content/12/9413312/html/admin/editPvtPage.php on line 286
There is nearly identical code above this problematic page. No other calls are made to header('location.....
I'm confused. Any ideas???
Is there a better way to do this?