Here is the code I have at the top of my page:
$preventSpam = ob_get_clean();
Here is the code that I have towards the bottom of my page:
$pageIntro .= "<p>$formFirstName, thank you for registering. An email has been sent containing a confirmation link. Click on this link to finalize your registration. You will then be able to login and conduct keyword searches and post your own testimonials.</p>
<p>Sometimes legitimate email mistakingly gets flagged as spam by internet service providers. Take action now to ensure your confirmation email does not get filtered into your junk or bulk mail folder.</p>";
Here is the error I'm getting when the page is loaded:
Warning: Cannot modify header information - headers already sent by (output started at /home3/recordau/public_html/newVersion/register.php:876) in/home3/recordau/public_html/newVersion/startSession.php on line [B]4
What is the best way to display the contents of an include file since this doesn't seem to work?
Is there a particular reason you need to do all this instead of include'ing the file where you have the echo statement?
I tried that and got an error. You see, I need the contents of that external file to be added to the $pageIntro variable so later the whole thing can be displayed, like this:
$pageIntro .= " contents of the include file ";
What is the best way to do this?
does preventSpam.php actually include PHP code? Or is it just HTML?
file_get_contents it instead of including it.
Also check to make sure there are no contents outputted before the header() is called.
Thank you, that did the trick brother!
This topic is now closed. New replies are no longer allowed.