Page 1 of 1

PHP Error text in Success page

Posted: Thu Jul 11, 2019 10:44 am
by Starb7
Hi Pablo

Just testing a site here, http://directgasltd.co.uk/testing/index.php and when I submit the form at the bottom, the email is processed and sent OK and the Success page show the correct content but there is a header showing what appears to be PHP code at the top. Can you advise why and how to get rid of it?

I have used similar code and system with another site, uploaded that to the same hosting package to test and that is OK so it appears to be something in this project. I have removed all the uploaded stuff and re-uploaded so it is 'clean' but still get the same error.

TIA

Re: PHP Error text in Success page

Posted: Thu Jul 11, 2019 11:34 am
by Pablo
The success page should not contain PHP code, so it cannot be the same page as the form.

Related FAQ:
http://www.wysiwygwebbuilder.com/forum/ ... 10&t=32967

Re: PHP Error text in Success page

Posted: Thu Jul 11, 2019 11:54 am
by Starb7
Hi Pablo

It isn't, or at least its not set to be!

The response page goes to ./contactresponse.php but I can see now I look in the address bar, it's going to a page called 'index' yet it is showing the content of the page called 'contactresponse.php'. What's going on?

Cheers

Re: PHP Error text in Success page

Posted: Thu Jul 11, 2019 12:06 pm
by Pablo
The success page is loaded dynamically, so all code of the page will be displayed "AS IS" without going through the PHP parser on the server.
There for the success (and error) page should not contain PHP.

Please remove the form from 'contactresponse.php'

See the FAQ.

Re: PHP Error text in Success page

Posted: Thu Jul 11, 2019 1:46 pm
by Starb7
Ah, got it. There is not form on the contactresponse.php page... or at least there wasn't supposed to be! I have found one grid that has no elements (used as a spacer) that had the form enabled and so was generating the issue. As always, many thanks!