Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help with Contact Form please

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #23501
    jim
    Member

    Hi, love your work, however, me being a designer and not a coder have a little help needed!
    I have uploaded your contact form, my host supports php and all that good stuff, yet I get an error on submitting the form.
    I am guessing I have set up the contactengine.php wrong, here is a link to the form:

    http://www.glass.netcom21.co.uk/contact2/index.html

    Here are the contents of my contactengine.php:

    <?php

    // CHANGE THE VARIABLES BELOW

    $EmailFrom = "[email protected]";
    $EmailTo = "[email protected]";
    $Subject = "Contact Form Submission";

    $Name = Trim(stripslashes($_POST));
    $Tel = Trim(stripslashes($_POST));
    $Email = Trim(stripslashes($_POST));
    $Message = Trim(stripslashes($_POST));

    // prepare email body text
    $Body = "";
    $Body .= "Name: ";
    $Body .= $Name;
    $Body .= "n";
    $Body .= "Tel: ";
    $Body .= $Tel;
    $Body .= "n";
    $Body .= "Email: ";
    $Body .= $Email;
    $Body .= "n";
    $Body .= "Message: ";
    $Body .= $Message;
    $Body .= "n";

    // send email
    $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

    // redirect to success page
    // CHANGE THE URL BELOW TO YOUR "THANK YOU" PAGE
    if ($success){
    print "<meta http-equiv="refresh" content="0;URL=contactthanks.html">";
    }
    else{
    print "<meta http-equiv="refresh" content="0;URL=error.html">";
    }
    ?>

    Any help greatly apreciated!
    Jim

    #50813
    Cotton
    Member

    I don’t know, I couldn’t see what your error was because of the custom error page – it looks like the error page that it briefly displays holds the answer though.

    #50817
    jim
    Member

    Yeah, I can’t stop the redirect, not sure how…
    I managed to take a screenshot of it though, amazingly :)

    #50820
    jim
    Member

    OK, so I fixed part of the problem, I changed ‘Tel’ to ‘City’ and that cleared that up, so now I am just getting:

    #50821
    jim
    Member

    Update: OK, so it seems that the email adress I was using is blocked, I will contact their host and resolve that.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.