Support Forums

Full Version: Contact form for HTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Hey guys,
I have recently designed a website for someone but the issue is the contact form.. I have used the following code for the contact..
Code:
<form action="mailto:email@yahoo.com" method="post" id="sendemail">
          <ol><li>
            <label for="name">Name (required)</label>
            <input id="name" name="name" class="text" />
          </li><li>
            <label for="email">Email Address (required)</label>
            <input id="email" name="email" class="text" />
          </li><li>
            <label for="website">Website</label>
            <input id="website" name="website" class="text" />
          </li><li>
            <label for="message">Your Message</label>
            <textarea id="message" name="message" rows="8" cols="50"></textarea>
          </li><li>
            <input type="image" name="imageField" id="imageField" src="images/submit.gif" class="send" />
            <div class="clr"></div>
          </li></ol>
          </form>
When a client click on the submit button it opens the users email client like outlook express/thunderbird... Instead I want when the submit button is clicked it should send the email to the desired email address directly instead of through the email client..

I would appreciate if some one could help me through this! Smile
Thanks in advance.
You need to use PHP. Try these codes:

Incorporate this in your page;
HTML:

This below must be named 'send_form_email.php'
You must edit 2 lines for yourself (email and subject)
PHP:
not working when I click on the submit button it takes me to : mysite.com/send_form_email.php which appears to be a blank page and the email is also not sent..
Did you put the PHP like I said into send_form_email.php ?
(01-22-2012, 09:52 PM)Laugh Wrote: [ -> ]Did you put the PHP like I said into send_form_email.php ?

yes i did.. :\
You did something wrong, no reason it wouldn't work.
Form action on your first code doesn't do anything but use the mailto:, which opens a mail client that you have installed like MS Outlook. You're not taking in any of the data from the form as variables.
here is the link for the contact page :- http://yiinternational.com/contact.html
I think i have done everything right... would appreciate if anyone can solve my problem Smile
Alright, I didn't even have to take a look, your contact form is with extension .html, when it should be contact.php.

Wrong:
Code:
http://yiinternational.com/contact.html

Right:
Code:
http://yiinternational.com/contact.php
oh yea, my bad... but its still the same http://yiinternational.com/contact.php
Pages: 1 2 3 4