Help buiding a "contact us" form in frontpage

Discussion in 'HTML & Website Design' started by jonas, May 15, 2007.

  1. #1
    I wand to hire someone to build a contact us form. (I am getting just too much spam with my email address visable.) Any help would be appreciated.

    I want it to have three options:

    Name
    Email
    Message

    And of course a submit button. email with particulars.
     
    jonas, May 15, 2007 IP
  2. 8everything

    8everything Peon

    Messages:
    16,350
    Likes Received:
    903
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To build a contact form page you need to script it in PHP and then integrate it into your HTML page. You can download free contact forms (as it's quicker than writing your own)
     
    8everything, May 15, 2007 IP
  3. ZaxiHosting

    ZaxiHosting Well-Known Member

    Messages:
    1,997
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Search for ready to install php form and link it from your page
    Regards
     
    ZaxiHosting, May 15, 2007 IP
  4. stevogarvey

    stevogarvey Guest

    Messages:
    277
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    stevogarvey, May 15, 2007 IP
  5. NITRO23456

    NITRO23456 Well-Known Member

    Messages:
    516
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #5
    To do this in php, I have written you a script!! firstly create the form in your html page by entering this code:

    <form action="mail.php" method="post">
    Name: <input type="text" name="name"><br>
    E-mail: <input type="text" name = "email"><br><br>
    Message<br>
    <textarea name="message"></textarea><br><br>
    <input type="submit" value="Submit">
    </form>

    Then create a file called mail.php in notepad and up load it (remember to get rid of the .txt and replacewith .php after uploading) with this in it:

    <?
    function checkOK($field)
    {
    if (eregi("\r",$field) || eregi("\n",$field)){
    die("Invalid Input!");
    }
    }

    $name=$_POST['name'];
    checkOK($name);
    $email=$_POST['email'];
    checkOK($email);
    $message=$_POST['message'];
    checkOK($message);
    $to="you@youremail.com";
    $message="$name left you a message. They said:\n$comments\n\nTheir e-mail address was: $email";
    if(mail($to,"From Contact Form",$message,"From: $email\n")) {
    echo "Thanks for your comments.";
    } else {
    echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
    }
    ?>

    Remember to change the email address and to leave me rep points
     
    NITRO23456, May 15, 2007 IP