HTML form to Email

3 posts Page 1 of 1
Contributors
User avatar
astheyfall
VIP - Donator
VIP - Donator
Posts: 160
Joined: Sun Sep 19, 2010 6:13 am

HTML form to Email
astheyfall
Hey guys! I was wondering if there's a way to create an HTML form that has input boxes for things such as "Name", "Comment", ect and once you press send, I receive an email that has the information they put.

It should send directly from the webpage, not redirect them to gmail or yahoo. I just can't seem to figure it out! Thank you!
User avatar
smashapps
Coding Guru
Coding Guru
Posts: 961
Joined: Tue Apr 05, 2011 8:41 am

Re: HTML form to Email
smashapps
Hey there #astheyfall

By itself, HTML cannot send an email. HTML can be used to build the form that can be filled in by the user but you will need a server side script to send an email.

Generally, what I do is use HTML to make my form and validate it (make sure it's filled in etc.) and then use PHP which uses the mail(); function.

If you want to use PHP (You will need a server, locally you can use something like Xampp) here is a link to the function:

http://www.w3schools.com/php/func_mail_mail.asp

If you need more help using PHP to send an email let me know,

If I've helped you be sure to give me a +rep :)

Thanks
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
User avatar
visualtech
VIP - Donator
VIP - Donator
Posts: 265
Joined: Sat Nov 19, 2011 2:19 pm

Re: HTML form to Email
visualtech
Hey #astheyfall,

Well as #smashapps correctly pointed out, you can't JUST use HTML; however, you CAN use PHP with Ajax so the user is on the same page.

PM me for the code :)
Image
3 posts Page 1 of 1
Return to “Help & Support”