Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

heehee

macrumors 68020
Original poster
Jul 31, 2006
2,469
235
Same country as Santa Claus
I'm trying to setup a form in my website, but I don't know how to make it work. I know how to code the actual form, but how do I make it send it to my email? Is there a easy code to do this? :eek:
 
The part of the Form tag you are interested in is the "action" parameter. This tells the browser what page/script will process the form when you click on the Submit button.

You can try adding action="mailto:me@email.com" to the form tag, but, not all browsers support this. If it does, you will get an attachment by email with the form data in one long string. It's not pretty, but, it's easy.

The only way to make this work for all browsers is to use a web script (PHP, Cold Fusion, Javascript, CGI) to collect the form data and send it by email.
 
Hi, If your server has PHP, all you need is a PHP, mail processor. In I have attached a simple one to use here. In the form action, just insert the name of the attached file, and upload the attached file to your server.
action="YouGetEmail.php"

It will gather all your fields inside your form automatically, and email them to the address your specify. It even has the option to upload files to your server, and email them to you as attachments. Very simple.

Give me an email if you have trouble setting it up.
 

Attachments

  • YogGetEmail.zip
    22.5 KB · Views: 87
Hey, brisbaneguy29, like that script, but how difficult would it be to modify it to send a .csv file instead of an HTML Table? I'll probably give it a try tonight if I get a chance, but any tips or warnings would be great.

jW
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.