Support Forums
Contact form for HTML - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Webmaster Support (https://www.supportforums.net/forumdisplay.php?fid=36)
+---- Forum: Website Development (https://www.supportforums.net/forumdisplay.php?fid=43)
+---- Thread: Contact form for HTML (/showthread.php?tid=24783)

Pages: 1 2 3 4


Contact form for HTML - Crystal - 01-22-2012

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.


RE: Contact form for HTML - Peter L - 01-22-2012

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:



RE: Contact form for HTML - Crystal - 01-22-2012

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..


RE: Contact form for HTML - Peter L - 01-22-2012

Did you put the PHP like I said into send_form_email.php ?


RE: Contact form for HTML - Crystal - 01-22-2012

(01-22-2012, 09:52 PM)Laugh Wrote: Did you put the PHP like I said into send_form_email.php ?

yes i did.. :\


RE: Contact form for HTML - Peter L - 01-22-2012

You did something wrong, no reason it wouldn't work.


RE: Contact form for HTML - AceInfinity - 01-23-2012

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.


RE: Contact form for HTML - Crystal - 01-23-2012

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


RE: Contact form for HTML - AceInfinity - 01-23-2012

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



RE: Contact form for HTML - Crystal - 01-23-2012

oh yea, my bad... but its still the same http://yiinternational.com/contact.php