Search the FirstSpirit Knowledge Base
I have PHP file for form processing but my FristSpirit server doesn't recognize PHP. Can you help me?
The PHP is not executed, I will attach image.
Have you changed the file extention to .php .
Isn't the PHP Start Tag <?php
Yes extension was changed, that in picture is output in browser when select inspect page.
Code looks like this:
<?php
echo 'Firstname'. $_POST["template-contactform-firstname"];
echo 'Lastname' . $POST['template-contactform-lastname'];
echo 'Email' . $POST['template-contactform-email'];
echo 'Company' . $POST['template-contactform-company'];
echo 'Country' . $POST['template-contactform-country'];
echo 'Phone' . $POST['template-contactform-phone'];
echo 'Message: ' . $_POST["template-contactform-message"];
?>
Hi Milovan,
the problem here is "htmlMode". FirstSpirit sees XMLish tags and wants to inject stuff for the preview, which fails sometimes.
See https://www.e-spirit.com/odfs52/template-develo/debugging/where-is-error/template-inspec/ for more information (Documentation FirstSpirit™ tells you the login credentials)
You need to deactive "htmlMode" for the tags, like this:
$CMS_SET(#global.htmlMode, false)$<?php$CMS_SET(#global.htmlMode, true)$
foobar
$CMS_SET(#global.htmlMode, false)$?>$CMS_SET(#global.htmlMode, true)$
In case you still get the commented-out version, caching is happening. You need to force-refresh, or simply wait a bit.
Cheers,
Lena
Hello Milovan,
is this still an open question? Do you need further help or did the given replies already help you?
If so it would be great if you mark the "correct answer".
Best regards
Sebastian