Error Messages when Using Contact.php

Discussion in 'Web Design and Hosting' started by embreys, May 31, 2011.

  1. embreys

    embreys New Member

    Hi,

    A new member so forgive me if the question seems basic to some people.

    I have put together a basic website and I want to use a form to initiate contact from potential customers. The website is for my partner who has started her own business.

    I have used iWeb to put the site together and created the form using a HTML snippet. In order for the form to send direct to her e-mail account, I did some research and found a simple php file that I could plagiarise for my own purposes.

    However, when I have uploaded it, and then test it on the server, I get the following message;

    Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting T_STRING in ......../public_html/index/Contact_files/contact.php on line 10

    I am no expert in php writing. The main contact form (contact.html) is in the public_html/index directory and the contact.php file is as stated in the error message.

    The php script I have is shown below (the correct e-mail address is substituted below for a generic fake);




    Any ideas why I get the error that I do? The HTML snippet that creates the form in iWeb definitely has "contact.php" as the action for the form.

    Thanks

    Steve
     
  2. talfighel

    talfighel Silver Member

    I think that this is the code that you should be using if you use .PHP on your site.



    Make sure you name your subsite something like this:

    www.YOURSITE.com/myoffer.php
     
  3. embreys

    embreys New Member

    talfighel: I think that this is the code that you should be using if you use .PHP on your site.


    I am not sure what you mean by this?? Affiliate link?

    Thanks
     
  4. Just2EZ

    Just2EZ Moderator

    embreys: $postcode_field/n Contact:
    Maybe a forward slash instead of a backslash?
     
  5. Takuyah

    Takuyah New Member

    You can use this free service from http://www.emailmeform.com.

    You can customize the contact form and paste the codes into your webiste.
     

Share This Page