• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS How to get a contact form to send an email


New Coder
I've created a contact us form, the usual name, email address and message boxes. The only thing i can get it to do when clicking submit is to get it to open a new email auto filled out with the info in the boxes and also the email address it needs to go to, so the person can then just press send on their email.

However, i'd prefer if when they press submit that it just sends off an email in the back ground from an email i can attach to it, or something like that, so theres no extra step of sending an email after pressing submit.

I'm using html and css.


King Coder
To send the data for the form automatically, you'll need to use a server side language like PHP to send an email from your server to yourself. Most cPanel web hosting will support PHP by default. Here is a tutorial on setting up some basic PHP to send an email from a contact form.