funkychunky Posted October 23, 2009 Share Posted October 23, 2009 I've read the http://www.phpfreaks.com/forums/index.php/topic,37442.0.html I don't think my code outputs any blank lines (I can't find it anyway) I am including a functions file in my project all over the place which works fine. However on this one page (which calls the following functions - clue there, I think?!) I get the internal server error. Can anyone spot the error? I'm stuck and it's gotta be done by tonight. function checkField($postKey) { global $tGlobalErrorMessage; global $aGlobalRegYears; $returnValue = FALSE; if (isset($_POST["txtEmailAddress"])) { switch ($postKey) { case "lstYearPlate": if(!in_array($_POST[$postKey], $aGlobalRegYears)) { $tGlobalErrorMessage .= "Please select Year/registration from the dropdown list."; } break; } $returnValue = TRUE; } else { $returnValue = FALSE; } return $returnValue; } function validQuoteRequest() { global $tGlobalErrorMessage; $bAllOk = true; //$bAllOk = checkField("txtEmailAddress"); if (! isset($_POST["txtEmailAddress"]) && ! isset($_POST["txtTelephone"])) { $bAllOk = FALSE; $tGlobalErrorMessage .= "Please enter at least ONE of either telephone or email address so we can get in touch."; } if ($_POST["chkDeclaration"] != "on") { $returnValue = FALSE; $tGlobalErrorMessage .= "Please confirm mileage, not written off, not private hire and ownership 'I hereby certify that...'."; } if ($bAllOk) { $tGlobalErrorMessage = ""; } else { //echo $tGlobalErrorMessage; } return $bAllOk; } Quote Link to comment https://forums.phpfreaks.com/topic/178746-that-old-malformed-headers-problem-again-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 23, 2009 Share Posted October 23, 2009 The error message states where the output is occurring at that is preventing the headers from working. You must find what is causing the output and prevent it or send it after any headers. Quote Link to comment https://forums.phpfreaks.com/topic/178746-that-old-malformed-headers-problem-again-help/#findComment-942888 Share on other sites More sharing options...
GKWelding Posted October 23, 2009 Share Posted October 23, 2009 can you paste the exact error message you receive? if it's blank then make sure you have error reporting level set to highest. Quote Link to comment https://forums.phpfreaks.com/topic/178746-that-old-malformed-headers-problem-again-help/#findComment-942891 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.