php include to add form not working
I am using WebDesigner 9 Premium
I want to include a form on my webpage using the php include function. I have placed the code: <?php include ("directory.php"); ?> in a placeholder on the page I want it to appear. I have checked that the name of the form ist correct, I have checked whether it is all in the same folder, i.e. is the path correct and although I can see the text being displayed in the code of the html page the form does not appear.
hier is the link
http://www.directory.ferienwohnung-a...e/formular.htm
Can somebody please enlighten me what I need to do for it to display correctly. I´ve spent hours trying to solve it myself but to no avail. Any help would be appreciated.
Thanks,
christa :)
Re: php include to add form not working
Hi Christa, in the page and layer gallery you will need to add the php extentsion to the page you will be adding the php code to eg. formular.php :)
Re: php include to add form not working
Hi Jamesd, thanks for your quick reply. I can´t figure out how to do that there is no reference in the manual. Does it mean I have to add a new layer, but than what?
Many thanks. :)
Re: php include to add form not working
Thanks, no need to reply to my former post. I figured it all out now. =D>
Re: php include to add form not working
Hello Christa
Your form link above does not work because the page has the htm instead of .php ending.
I am not certain, but I believe you can rename an individual page in Website Properties > Page > Page filename:
Change the page name to formular.php and this page should then publish with the .php extension and the other pages will still publish as .htm.
Re: php include to add form not working
Yes, thank you gwpriester , that is what I figured out from Jamesd reply. However, I still got a small problem. I am publishing in German, i.e. I need it to display the Umlauts, ie. ä, ü, Ä, Ü correctly. I have added the following line of text
<?php echo '<?xml version="1.0" encoding="IUTF-8"?>'; ?>
to the header section of the page "formular.php", thinking that would do the trick but to no avail. I have also had tried putting this line of code along side the php include, that did not work either.
Do you know where it should go? :)
Re: php include to add form not working
I am not sure where this script should go (Acorn will know when he checks in). Is it just the .php page that you need this code inserted or the entire website?
My guess is it should go in the HTML Code (head) window for either the .php page or if it needs to be for the entire site then in Website > HTML Code (head) window.
Re: php include to add form not working
I just Need it on the Page where the form is, the Website itself is fine. As i Said i put it in the Head Tag of the page but that gets ignored. So Hope that acorn will Check in. Ta
Re: php include to add form not working
Hi Christa, try
<?php echo '<xml version="1.0" encoding="IUTF-8">'; ?>
;)
Re: php include to add form not working
Quote:
Originally Posted by
christag
I just Need it on the Page where the form is, the Website itself is fine. As i Said i put it in the Head Tag of the page but that gets ignored. So Hope that acorn will Check in. Ta
Christa, I assume you are not getting the result when the site is published and not just exported locally?
A variation I would try is:
Code:
<?php
header("Content-type: text/xml");
echo "<?xml version='1.0' encoding='UTF-8'?>";
?>
You could also thy this META tag instead in your page head code area:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />