Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending mail from within web pages using form data

Status
Not open for further replies.

miseo

Programmer
Jan 11, 2004
9
AU
I am creating an enquiry page for a website of mine, and I am wondering is there an easy way of sending an email to a certain address based on the value of a field in a form, for example a combo box, radio button, etc object?

I don't care what language the solution is in, but I don't have access to the actual server that it is being published on, so if this can be a universal solution, that would be appreciated.
 
JavaScript has no mailing function, to my knowledge, so you can't create a JavaScript function that will mail the form info to a specific address.

But with PHP (for example) it would be very easy. When you submit a form PHP creates variable names for each form element. You then simple put the rigt variable in PHP's build-in mail function.

In order for this to work PHP must be installed on your webserver. Check with your ISP.
 
Another possibility is CGI / Perl.

You really need to contact your host to discuss what options are available within the hosting plan you have.

For cheaper hosting options is it common for the host to provide access to a formmail script. They can provide instructions re the URL to submit the form to and the required fields within your form.

Hope this helps.

Nigel Wilson
"kiwi-kid"
 
I worked it out, the server I post the websites on runs gForm, which has the functionality that I need so it's all good.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top