Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Feb 2012
    Posts
    7

    Default 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

  2. #2
    Join Date
    Aug 2010
    Posts
    533

    Default 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

  3. #3
    Join Date
    Feb 2012
    Posts
    7

    Default 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.

  4. #4
    Join Date
    Feb 2012
    Posts
    7

    Default Re: php include to add form not working

    Thanks, no need to reply to my former post. I figured it all out now.

  5. #5
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,518

    Default 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.

  6. #6
    Join Date
    Feb 2012
    Posts
    7

    Default 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?

  7. #7
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,518

    Default 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.

  8. #8
    Join Date
    Feb 2012
    Posts
    7

    Default 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

  9. #9
    Join Date
    Aug 2010
    Posts
    533

    Default Re: php include to add form not working

    Hi Christa, try
    <?php echo '<xml version="1.0" encoding="IUTF-8">'; ?>

  10. #10
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,883

    Default Re: php include to add form not working

    Quote Originally Posted by christag View Post
    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" />
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •