Evil Phil wrote: » Can we see the full code for the thankyou.htm file? It seems to me from what you've said that it is the line include('thankyou.htm'); that is throwing the error. And you should probably just use single quotes instead of a mixture of the too.
CuLT wrote: » If "thankyou.htm" is actually a HTML page then that's why the error is being thrown (can't just include HTML pages in PHP code). And more conformity with the quotes would also be good practice
deepriver wrote: » How do I get the php to return a html page? This code actually worked before, just when i moved it to another page in another directory it started going wrong
Webmonkey wrote: » You could do all the sending an error processing , then if all ok do a [php]header('location: /subdir/thankyou.html');[/php] on top your page (before any output done) and it will display this page
Webmonkey wrote: » What's the error. It must be in the PHP script you doing the processing so if that is the case. By the way, where you have include('thankyou.htm');, you'd put that line. really you should do more server side checks to ensure correct and sufficient details entered. You could simply just have your HTML page start under the closing PHP tag also, nothing wrong with that.
Webmonkey wrote: » Eh? - Where is this script working, where the thank you page - surely not in the cgi-bin. You may have your server set up to interpret html files as Perl. Strange
CuLT wrote: » If "thankyou.htm" is actually a HTML page then that's why the error is being thrown (can't just include HTML pages in PHP code)
When a file is included, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags.
eob wrote: The eot has to be at the start of the line. Otherwise a header re-direct will work, just give the file a html extention instead of a PHP one. It may be that php is not set up correctly on your computer and the xml at the top (the <? bit especially) is throwing it off.
daymobrew wrote: » The docs for include seem to imply otherwise.
deepriver wrote: » coming from a non-tech background.. it seems a bit lame on dotmobi to recommend starting a xhtml page with <? if any interaction with php code is going to screw everything up... I got a fix on the php code side, but it could have been solved by reverting the html code back to the standard <!DOCTYPE html......