...

View Full Version : what is wrong with this code



chompper27
12-14-2009, 04:37 PM
how come it wont email me the information i type in the box and press enter but when i check my email its not there i have to be missingsomething in my code please helpit would be greatly appreciated thanks

chompper

this is the code



<form>
<FORM ACTION="someone@aol.com" ENCTYPE="text/plain" METHOD=POST>
Comments: <INPUT TYPE="textarea" NAME="name">
</form>

Rowsdower!
12-14-2009, 04:47 PM
how come it wont email me the information i type in the box and press enter but when i check my email its not there i have to be missingsomething in my code please helpit would be greatly appreciated thanks

chompper

this is the code



<form>
<FORM ACTION="someone@aol.com" ENCTYPE="text/plain" METHOD=POST>
Comments: <INPUT TYPE="textarea" NAME="name">
</form>

I think that should be "mailto:someone@aol.com" to make that function.

Give this a read first, though, as this method is sort of a bad idea:
http://www.netmechanic.com/news/vol3/form_no4.htm

You can try the remote CGI that they mention or you could look into PHP. If your host offers support for PHP and, in particular, the mail() function then you should most definitely consider using that instead.

tortcher
12-15-2009, 09:39 AM
Yes he is correct with the mailto.

A simple link can look like this....



<a href="mailto:someone@hotmail.com">This is my simple link</a>


Obviously this is just a text link, but the mailto: is the answer you are looking for I think.

vineet
12-15-2009, 10:02 AM
to send input textbox information to your email you need to use some server side script like php or asp.

you cannot send input textbox information with html alone.

see this for reference
http://www.w3schools.com/PHP/php_mail.asp

vineet

Rowsdower!
12-15-2009, 02:18 PM
to send input textbox information to your email you need to use some server side script like php or asp.

you cannot send input textbox information with html alone.

see this for reference
http://www.w3schools.com/PHP/php_mail.asp

vineet

Yes, which is why I mention the CGI. With the appropriate CGI in place you most certainly can use the form in the format the OP posted (if you add the "mailto:" part to the action attribute).

It's still a better idea to use PHP or ASP as we have all said so far, but technically it "can" be done as posted above with the right tools in place.

Trinithis
12-24-2009, 10:08 AM
You do realize chompper27 has been trolling intentionally since his first thread right?

Rowsdower!
12-24-2009, 05:11 PM
You do realize chompper27 has been trolling intentionally since his first thread right?

I haven't paid close enough attention I suppose. Why has he not been banned?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum