Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

<form> actions?

Hey!

So I'm creating a form where I have a couple text fields and I'd like the information sent to me somehow (without paying a service preferably). I was going to use the action="mailto:______", but that seems to simply ope up the default email application.

Is there a form action that will simply send the information to an email address or database as soon as they click the submit button?

Also, how can I program the submit button to redirect to a specific url?

Thanks!

This is one solution PHP 5 mail() Function.

3 Answers

You will need to use PHP for those actions. There is a section called "Adding a Contact Form" in the Build a Simple PHP Application lesson that can help with what you are looking for.

You would have to use a back end language like PHP or something similar. HTML cannot perform this action alone.

Awesome thanks, I'll check that section out