Skip navigation
Currently Being Moderated

php form shows php

Apr 10, 2013 3:14 AM

Hi Guys,

 

I am new to the forums, and recently new to DWCS6.

 

I previously wrote a simple website in DW4 many moons ago, and have come back to the latest and greatest in order to throw together a website.

 

I am producing a contact us page, and used an online resource that has generated for me the php pages etc with all the required fields.(courtesy of http://phpfmg.sourceforge.net/).

 

I have then tried to iframe this php form in my webpage (html pages), and the outcome is disappointing. I see several elements of PHP visible in the form, and things like the security / antispam validation do not appear at all.

 

below is a snippet of what I see....

 

phperr.png

 

Has anybody any suggestions for a newbie on how to fix this? This is my first real venture beyond HTML, so I am new to most of it.

 
Replies
  • Jim Carpenter
    546 posts
    Apr 6, 2006
    Currently Being Moderated
    Apr 10, 2013 5:16 AM   in reply to jeeb.fr

    It has to have a php extension to work. It can't be html unless your server is set to process html as php.

     

    Jim

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 10, 2013 5:26 AM   in reply to jeeb.fr

    Why are you using an iFrame? Why cant you directly make a .php file and put in your form in it?

     

    Make a .php file to parse PHP content. Period.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 9:37 AM   in reply to jeeb.fr

    >The form has a .php extension which is why I believed that it should be ok.

     

    Correct. If the embedded form page has a php extension then it should work. The parent page can be html. Are you sure that php is enabled on your server?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 3:15 PM   in reply to jeeb.fr

    >I believe the host does permit php when it gets that far

    >however is there an option needed in dw to advise itself php is in use?

     

    You need to install a test server that is running php if you want to preview php pages.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 3:38 PM   in reply to jeeb.fr

    #1 Install a Local Testing Server on your machine.

         Win - get Wamp or Xampp

         Mac - get Xampp or Mamp

     

    #2 Move your local site files to the designated folder in your Testing Server.  Either www for Wamp or htdocs if using the others.

     

    #3 In DW, go to Site > Manage Sites and edit your site definition to add a Testing Server.  See screenshots below.

    CS6-testingServer1.jpg

     

    CS6-testing-server-advanced.jpg

     

    CS6-testingServerFinalScreen.jpg

     

    For more details, see Setting up a PHP environment in Dreamweaver

    http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html 

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 3:40 PM   in reply to bregent

    Or, just simply mount it on a web server that offers php (GoDaddy's cheap servers don't). Put what you are working on and aren't ready to show to the public in a /test/ folder on that server (php doesn't care where your page is, the server simply interprets the code.

     

    And the page with the php has to end with the .php extension, which will tell your server to interpret the code.

     

    You can work with php in two ways: Dreamweaver kind of encourages putting php stuff in-line with HTML on a page. People who write a lot of php code like the HTML page to call an external php file. That way everything is separate.

     

    But if your HTML pages have php code in them, you must give it the extension .php and not .html or .htm

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 11, 2013 10:01 AM   in reply to jeeb.fr

    .html pages are static.  They do not parse data or execute scripts.

     

    PHP is a server-side programming language for creating dynamic sites.  The .php file extension tells the server to execute PHP scripts & parse data (usually from a MySql database) into web pages.   PHP does not create clean URLs. 

     

    This web forum uses ColdFusion as its programming language. In other words, all the pages on this site have .cfm file extensions.

     

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points