Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

I need to add a simple form to a contact us page. What is the easiest way to do this?

I have a contact us page, with a form that will ask for a potential customers name, email address, business name, phone number, and a text area field for comments. I need to have this form submit to an email address. A Thank You page would be good, if possible. Nothing fancy, something very simple. What is the fastest and easiest way to create such a form? I'm on a shared server that does support simple scripts, but something easy. Thanks.

3 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    Use a server-side script language if your web site allows it. Otherwise, you will have to use a client-side dependent "mailto:" action to get the form info sent to you.

    Your current hosting package MUST allow SMTP ( http://en.wikipedia.org/wiki/Simple_Mail_Transfer_... ) to work. Otherwise, no email can be sent.

    Use any of the below sites to make the workable form you need:

    For making forms:

    These are really good online form makers. Just follow the instructions for making it and uploading file(s).

    http://www.phpform.org/

    http://www.tele-pro.co.uk/scripts/contact_form/

    http://www.jotform.com/?gclid=CNKhqei1wJ4CFRQhnAod... (WYSIWYG Form Maker)

    http://www.thesitewizard.com/wizards/feedbackform....

    http://www.thepcmanwebsite.com/form_mail.shtml

    http://emailmeform.com/

    http://www.freecontactform.com/

    http://www.reconn.us/content/view/12/34/ (Download - Contact Us Script)

    http://formsmarts.com/

    Source(s): PHP Mailer Script Step by Step: http://www.htmlgoodies.com/beyond/php/article.php/... PHP Sending E-mails: http://www.w3schools.com/PHP/php_mail.asp Freebie: Good looking Fluid Contact Form: http://www.flashuser.net/flash-components/freebie-... Can't use server-side, then... Basic Client-Side Mailto: Form: <form method="post" action="mailto:someone@$nailmail.com" enctype="text/plain"> <input type="text" name="username"> : name <br> <input type="text" name="email"> : email <br> comments <br> <textarea name="comments" rows="10" wrap="hard"> </textarea> <input name="redirect" type="hidden" value="index.html"> <input name="NEXT_URL" type="hidden" value="index.html"><br> <input type="submit" value="Send"> <input type="reset" value="Clear"> </form> mailto - Web-based email Form Handler: http://www.washington.edu/webinfo/mailto/ Ron
  • 1 decade ago

    Go to http://www.web2coders.com/ and download "form to email". It is a Php script.

    You can try it before you download.

    Since you already have the form, just adapt the script to your form.

  • 1 decade ago

    a simple form that will take the input of the user of the form n send it to an email that u put.

    hope this helps. btw its a working code i send u. tested n proven. ;)

    u shud save this page as Contact_us.php

    <?php

    if(isset($_POST['submit']))

    {

    $canotsave=0;

    //-----------------------------------------Validating Comment

    //checking for empty fields

    if($_POST["strComment"] == NULL)

    {

    $canotsave=1;

    $error='Comment Box Cannot be left blank.';

    }

    if($_POST["strComment"] == 'We value your comments.')

    {

    $canotsave=1;

    $error='Please verify your comment.';

    }

    //-----------------------------------------Validating Email

    function validate_email($strEmail)

    { if (ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([_a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]{2,200}\.[a-zA-Z]{2,6}$", $strEmail ) )

    { return true;}

    else

    { return false;}

    }

    //checking for valid emails

    if (!validate_email($strEmail))

    {

    $canotsave=1;

    $error='Invalid Email.';

    }

    //checking for empty fields

    if($_POST["strEmail"] == NULL)

    {

    $canotsave=1;

    $error='E-mail required.';

    }

    if($canotsave==0)

    {//if validation is sucessful

    $strComment.="<br>Yours ".$strName;

    $email = "YOUREMAIL@SOMETHING.COM";

    mail($email, $strSubject, $strComment, "From: $strEmail");

    }

    }

    ?>

    <body>

    <div id="wrap">

    <?php include 'include/menu.php';?>

    <br/><br/>

    <form action="Contact_us.php" method="post">

    <table width="60%" align="center">

    <tr>

    <td colspan="2"><h2>Contact us</h2>

    <?php

    if(isset($canotsave))

    {

    if(!$canotsave==0)

    {

    echo "<font color='#FF3300'>$error</font>";

    }

    }

    ?>

    </td>

    </tr>

    <tr>

    <td>Name</td>

    <td><input type="text" name="strName" size="26" /></td>

    </tr>

    <tr>

    <td>Subject</td>

    <td><input type="text" name="strSubject" size="26" /></td>

    </tr>

    <tr>

    <td>Email</td>

    <td><input type="text" name="strEmail" size="26" /></td>

    </tr>

    <tr>

    <td>Comment</td>

    <td> <textarea rows="6" cols="20" name="strComment">We value your comments.</textarea></td>

    </tr>

    <tr>

    <td colspan="2" align="right"><input type="submit" name="submit" value="Send Comment" /></td>

    </tr>

    </table>

    </form>

    <br/><br/><br/>

    </div>

    </body>

    </html>

Still have questions? Get your answers by asking now.