View Single Post
Old 12-24-2012, 10:06 PM   PM User | #1
rgEffects
New Coder

 
Join Date: Aug 2012
Posts: 76
Thanks: 22
Thanked 0 Times in 0 Posts
rgEffects is an unknown quantity at this point
header errors on one page but not another

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?
rgEffects is offline   Reply With Quote