Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 4 of 4
  1. #1
    Platinum Lifetime Member

    Join Date
    Mar 2007
    Location
    usa
    Posts
    28
    DNF$
    17
    Bank
    0
    Total DNF$
    17
    Donate  

    Looking For Help With Contact Form

    Hi

    I need some help with a php style contact form.

    I tried to find a few free ones with no luck.

    Its for a site I own and I need a contact form on the site.

    Any help is appreciated.

  2. #2
    Platinum Lifetime Member
    Makis77's Avatar
    Join Date
    Sep 2006
    Location
    Glifada
    Posts
    957
    Country

    Greece
    DNF$
    1,566
    Bank
    0
    Total DNF$
    1,566
    Donate  
    i found a free one that works,
    pm me for more.

    Hacks.info for sale
    ~All offers are valid for 24 hours(1 day) from the posting time~

  3. #3
    Account Terminated
    Join Date
    Aug 2006
    Location
    MI / NYC
    Posts
    375
    Blog Entries
    10
    DNF$
    4,160
    Bank
    0
    Total DNF$
    4,160
    Donate  
    Why use a free one when a little code can have your form up and running. I'm gonna go out of my way and show you how it's done, whether you read this and learn from it is up to you, hope this helps someone who reads it in the future.

    [in the contact page or the page in which you want to present your form, add the folowing]
    <form method="post" action="contact.php"> -- [contact.php being the file we will create later]
    [Add your fields in here]
    Demo Field <INPUT TYPE="text" NAME="demo" SIZE="10"> [this is an example of how one of your fields would look like, remember to add a Name tag]
    <input name="submit" type="submit" value="Submit" /> [add this after you have inserted all your form fields above]
    </form> -- [close your form, obviously]

    Now the part most people screw up on. It's simple and easy to understand.

    First, create a file called contact.php as stated above. (create an ok.htm page this will be the page the user is redirected to if the form is sent successfully. Create an error.htm page also with a custom error message or the form with highlighted fields that should have been filled if the form is not sent)

    Add the following into contact.php:
    PHP Code:
    <?php
    $EmailTo 
    "youremail@yourdomain.com";
    $demo Trim(stripslashes($_POST['demo'])); 

    $Body "";
    $Body .= "demo: ";
    $Body .= $demo;
    $Body .= "\n";

    $success mail($EmailTo$demo$Body);
    if (
    $success){
      print 
    "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
    }
    else{
      print 
    "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
    }
    ?>

    Hope that helps...

  4. #4
    Platinum Lifetime Member

    Join Date
    Nov 2006
    Location
    USA
    Posts
    493
    DNF$
    84
    Bank
    0
    Total DNF$
    84
    Donate  
    PM me if you are looking for a professional solution.

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
  •  

Domain name forum recommended by Domaining.com