Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Banned
    Join Date
    Dec 2009
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    what is wrong with this code

    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>

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by chompper27 View Post
    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.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #3
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    See above

    Yes he is correct with the mailto.

    A simple link can look like this....

    Code:
    <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.

  • #4
    Regular Coder
    Join Date
    Jun 2008
    Posts
    173
    Thanks
    2
    Thanked 9 Times in 9 Posts
    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

  • #5
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by vineet View Post
    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.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #6
    Regular Coder
    Join Date
    Jun 2007
    Location
    USA
    Posts
    527
    Thanks
    26
    Thanked 74 Times in 72 Posts
    You do realize chompper27 has been trolling intentionally since his first thread right?
    Trinithis

  • #7
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by Trinithis View Post
    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?
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •