Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Member #
    34052
    Hi Guys,

    Was hoping someone could help me to make a working contact form for my site, I'm new to web design, and don't know anything about php. The html side of my form is:

    <form action="mail.php" method="post">
    <div class="six columns">
    <input type="text" name="name" maxlength="50" placeholder="Name" />
    </div>
    <div class="six columns">
    <input type="text" name="phone" maxlength="50" placeholder="Phone" />
    </div>
    <div class="six columns">
    <input type="text" name="email" maxlength="50" placeholder="Email" />
    </div>
    <div class="six columns">
    <input type="text" name="company" maxlength="50" placeholder="Company" />
    </div>
    <div class="twelve-form columns">
    <textarea type="text" name="description" maxlength="1000" placeholder="Detailed project description" id="inlineTextarea"></textarea>
    </div>
    <div class="three columns">
    <p><a href="mail.php" class="nice radius blue button mobile src-download">Submit</a></p>
    </div>

    Thanks in advance!

  2.  

  3. #2
    Junior Member Jimmy Jones's Avatar
    Join Date
    Oct 2012
    Location
    Waxahachie, Texas
    Posts
    20
    Member #
    33137
    Liked
    2 times
    It doesn't look like your form has a closing tag, and I'm not sure that the submit button as it is here will submit the info from the form. It looks like it will just take you to the mail.php without sending the form data.

    W3C has a sample php script you could use to mail a form, but you'll need to modify some of the parameters to make it work here: http://www.w3schools.com/php/php_secure_mail.asp

    Be sure to use the one that is coded to stop email injections.

  4. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Member #
    34052
    That looks great Jimmy - thanks for your response.

  5. #4
    Junior Member cpowell89's Avatar
    Join Date
    Dec 2012
    Location
    England
    Posts
    6
    Member #
    34201
    I'd take a look at AJAX based contact forms as well. They're a much more modern approach. Doesn't require the page to refresh either! I found out the old tutorial i first used when I started here:
    http://net.tutsplus.com/tutorials/ja...-using-jquery/

    As an addition to that tutorial I'd look into sending JSON strings to the server rather than the approach it uses. It's somewhat neater and easier to follow.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:33 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com