Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Contact.php problems

  1. #11
    Join Date
    Feb 2011
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi now its giving me an error

    Parse error: syntax error, unexpected $end in \\nas41ent\domains\p\#####.co.uk\user\htdocs\contact.php on line 161

    Which is this </html>

    Anything i do seams to result in either an error, the form not working or it just going to the thankyou page and not sending an email..

    Thanks

  2. #12
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    This usually happens when you forget to close a curly bracket, }
    Jeremy | jfein.net

  3. #13
    Join Date
    Feb 2011
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for that, the php had no errors then i added the html like you said and it had the error, should i off added a } soemwhere even tho there wasnt an error before i added the html?

    thanks

  4. #14
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    No, paste all your code here.
    Jeremy | jfein.net

  5. #15
    Join Date
    Feb 2011
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    HTML Code:
    <?php
    $fullname = $_POST["fullname"];
    $businessname = $_POST["businessname"];
    $address = $_POST["address"];
    $postcode = $_POST["postcode"];
    $emailaddress = $_POST["emailaddress"];
    $phonenumber = $_POST["phonenumber"];
    $quotedetails = $_POST["quotedetails"];
    $verif_box = $_POST["verif_box"];
    
    $to = "info@#####.co.uk";
    $subject = "enquiry";
    $headers = "From: $emailaddress\n";
    header("location:http://www.#####.co.uk/thankyou.html");
    
    
    $message = "A visitor to your site has filled out the following information.\n
    Full Name: $fullname
    Business Name: $businessname
    Company Address: $address
    Post Code: $postcode
    Email Address: $emailaddress
    Phone Number: $phonenumber
    Quote Details: $quotedetails ";
    
    if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
    mail($to,$subject,$message,$headers);
    }
    
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    <p>Thank you</p>
    </body>
    </html>
    I`ve narrowed it down as the thankyou page i am using was is a full web page with all my details on ect..

    Thanks again

  6. #16
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    May I please see all the code? I don't see any issues with that.
    Jeremy | jfein.net

  7. #17
    Join Date
    Feb 2011
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, i`m sure you will understand as my contact form isn`t safe from spammers, i`d like to keep it safe, and not broadcast the details to be picked up by search engines spammers ect, untill i get it sorted at least and as i still get the problem with the code i gave???

    Thanks anyway

  8. #18
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I don't really understand. You want me to help you but you won't give me the code? If this is the issue, please PM me the code so i can take a look at it.
    Jeremy | jfein.net

  9. #19
    Join Date
    Feb 2011
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Nile,

    What part of the code do you need? the only thing missing is the site name and my email address, are they needed? or can i add them in later when the problem is solved?

    thanks again

  10. #20
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by Biglad View Post
    I`ve narrowed it down as the thankyou page i am using was is a full web page with all my details on ect...
    Quote Originally Posted by Biglad View Post
    Hi, i`m sure you will understand as my contact form isn`t safe from spammers, i`d like to keep it safe, and not broadcast the details to be picked up by search engines spammers ect, untill i get it sorted at least and as i still get the problem with the code i gave???

    Thanks anyway
    From this, I understand there is more code other then just your email and website name.
    Jeremy | jfein.net

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
  •