ICEcoffee Posted February 27, 2004 Share Posted February 27, 2004 Hi there Tried the code above, it didn't work, here is the adjusted code: ======================================================== if ((isset($HTTP_POST_VARS["MM_update"])) && ($HTTP_POST_VARS["MM_update"] == "FRMcomplete")) { $updateSQL = sprintf("UPDATE customers SET Callid=%s, Complete=%s WHERE ID=%s", GetSQLValueString($HTTP_POST_VARS['Callid'], "int"), GetSQLValueString($HTTP_POST_VARS['Complete'], "int"), GetSQLValueString($HTTP_POST_VARS['ID'], "int")); mysql_select_db($database_dandatoys, $dandatoys); $Result1 = mysql_query($updateSQL, $dandatoys) or die(mysql_error()); header("Location:CallsOutstanding.php"); } ======================================================== I still get the error: Warning: Cannot modify header information - headers already sent by (output started at....... I also looked at the <?PHP tags at the start of the page and see no spaces. So whats up? Quote Link to comment https://forums.phpfreaks.com/topic/1702-need-help-with-redirect/ Share on other sites More sharing options...
dereko Posted March 1, 2004 Share Posted March 1, 2004 It means you have echoed information to the html already and PHP can't write to two differnt locations... you can however get around this by buffering the html before you output it. Put // This function will turn output buffering on. While output buffering is active no output // is sent from the script (other than headers), instead the output is stored in an internal buffer. ob_start(); // This allows me to call the header() function in the included files for redirecting at the start of your php file. and .. ob_end_flush(); // flush buffer content to the screen at the end of your php file. it is important that you put the ob_start before anything else on the page as it may try to display information. Quote Link to comment https://forums.phpfreaks.com/topic/1702-need-help-with-redirect/#findComment-5569 Share on other sites More sharing options...
dereko Posted March 1, 2004 Share Posted March 1, 2004 It means you have echoed information to the html already and PHP can't write to two differnt locations... you can however get around this by buffering the html before you output it. Put // This function will turn output buffering on. While output buffering is active no output // is sent from the script (other than headers), instead the output is stored in an internal buffer. ob_start(); // This allows me to call the header() function in the included files for redirecting at the start of your php file. and .. ob_end_flush(); // flush buffer content to the screen at the end of your php file. it is important that you put the ob_start before anything else on the page as it may try to display information. Quote Link to comment https://forums.phpfreaks.com/topic/1702-need-help-with-redirect/#findComment-5570 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.