php error = header(
pagecopy_detail.php page is failing to respond to pagecopy_update.php page. Other sets such as staff names etc are working fine.
I put an show php error at the top of the page and it says:
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/Connections/xxxxxxx.php:17) in /home/xxxxx/public_html/webassist/mysqli/queryobj.php on line 711
Line 711 is
header("location: " . $url);
contained in these lines
if ($this->JavascriptRedirect) {
echo('<script>document.location.href="'.$url.'";</script>');
} else {
header("location: " . $url);
}
die();
}
This is an older site still on 5.4. The front facing pages test ok on 7.4 when I flip to test. It's just in the admin area for client updates.
Any suggestions most appreciated.
~~~
$WADApagecopy_update = new WA_MySQLi_RS("WADApagecopy_update",$xxxxxx,1);
$WADApagecopy_update->setQuery("SELECT pc_ID, pc_URLtitle, pc_metadescription, pc_title, pc_content, pc_link FROM pagecopy WHERE pc_ID = ?");
$WADApagecopy_update->bindParam("i", "".(isset($_GET['pc_ID'])?$_GET['pc_ID']:"") ."", "-1"); //colname
$WADApagecopy_update->execute();
?>
<?php
if (isset($_POST["Update"]) || isset($_POST["Update_x"])) {
$UpdateQuery = new WA_MySQLi_Query($xxxxxx);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "pagecopy";
$UpdateQuery->bindColumn("pc_URLtitle", "s", "".((isset($_POST["pc_URLtitle"]))?$_POST["pc_URLtitle"]:"") ."", "WA_BLANK");
$UpdateQuery->bindColumn("pc_metadescription", "s", "".((isset($_POST["pc_metadescription"]))?$_POST["pc_metadescription"]:"") ."", "WA_BLANK");
$UpdateQuery->bindColumn("pc_title", "s", "".((isset($_POST["pc_title"]))?$_POST["pc_title"]:"") ."", "WA_BLANK");
$UpdateQuery->bindColumn("pc_content", "s", "".((isset($_POST["pc_content"]))?$_POST["pc_content"]:"") ."", "WA_BLANK");
$UpdateQuery->bindColumn("pc_link", "s", "".((isset($_POST["pc_link"]))?$_POST["pc_link"]:"") ."", "WA_BLANK");
$UpdateQuery->addFilter("pc_ID", "=", "d", "".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."");
$UpdateQuery->execute();
$UpdateGoTo = "pagecopy_detail.php?pc_ID=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."".(isset($_GET["pageNum_WADApagecopy"])?"&pageNum_WADApagecopy=".intval($_GET["pageNum_WADApagecopy"]):"") ."";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
PS: the updater page does update the database so that part works OK.