Click to See Complete Forum and Search --> : How do I make a submit button send to an email?


chal7ds
10-14-2004, 12:39 PM
Hello All,

I have made myself a nice little form for customers to fill out using Dreamweaver MX 2004. I am by no means a computer website guru..or coding guru..that's why I bought Dreamweaver. So, I heard in order to make my form work by having the customer info in the fields get sent to my e-mail address when they press the submit button, is to use PHP. I have no idea what PHP is, and I'm not good at technical jargon, or even HTML for that matter. So, in answering my question, it would probably be best to talk to me like a 10 year old kid!

The page with my form is at:

http://www.chal-art-draft.com/appointment.html

If you go there, you can view the source html code from your browser. From there, maybe you can tell me how I would need to change my code via PHP to make the "request appointment" (submit) button work properly. I haven't created a 'thank-you' for submitting page yet either..so I probably have to do that sooner or later..

Any help out there php experts, would be great! or any help at all..maybe php isn't the way to do it?!?

Computer loser guy
email: chal7ds@yahoo.com

chal7ds

NogDog
10-14-2004, 01:22 PM
PHP is certainly one tool you could use to do this, though it is by no means the only one. One simple option would be to check with your webserver administrator and see if it supports a basic "CGI" form mail service. If so, the administrator can tell you its name and the exact data to enter into your <form> tag. Typically it will be something like:

<form action="http://www.yoursite.com/cgi-bin/email?yourname" method="post">

In this case you have little or no control over how the content is displayed, it generally just sends a series of lines listing each form element name followed by its contents. For more control over what gets emailed and how it looks, you could create a custom PHP, Perl, or other server-side language script to process your form and email it. PHP for example has a function called mail() (oddly enough :) ). Before pursuing this path, you again need to check with your webserver admin as to what server-side languages are supported by your site.

chal7ds
10-14-2004, 03:38 PM
NogDog,

Thanks for the info. You're the first guy who gave me at least some information for me to get started on this...i tried other forums and no one ever replied anything!

I e-mailed my server right after, so they should be getting back to me if they have some sort of CGI service or PHP deal.

Oh, I checked out your site, guess what? ...i have a blue heeler too, she is also part acd and mutt! coincidence!! her name is billy..but her colors are totally tanish/orangeish...

Thanks again!

Chal7ds@yahoo.com
Chalin M. (chal7ds)

NogDog
10-14-2004, 03:48 PM
Originally posted by chal7ds
Oh, I checked out your site, guess what? ...i have a blue heeler too, she is also part acd and mutt! coincidence!! her name is billy..but her colors are totally tanish/orangeish...

If she's anything like my mutt, I'll bet you've got a great friend there. :)

yuna
10-15-2004, 07:29 AM
While you're waiting for your hosting provider to respond, give this a try:

<form action="mailto:you@youraddress.com" method="post">

I believe that will mail you the contents of the form. However it also displays your address to spam spiders (they read the HTML source not what's displayed on the screen), so you might want to use a different email address from your personal one.