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 9 of 9
  1. #1
    Regular Coder
    Join Date
    Oct 2011
    Posts
    595
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Submit button not working

    I setup a comment page. but for some reason. When I test the submit button. It opens outlook, and I don't use Outlook. Why is that?


    Code:
    <form action="mailto:[email protected]" method="post" enctype="text/plain">
    Name:<br>
    <input type="text" name="name"><br>
    E-mail:<br>
    <input type="text" name="mail"><br>
    Comment:<br>
    <input type="text" name="comment" size="50"><br><br>
    <input type="submit" value="Send">
    <input type="reset" value="Reset">
    </form>

  2. #2
    Senior Coder benanamen's Avatar
    Join Date
    Oct 2015
    Posts
    1,640
    Thanks
    11
    Thanked 165 Times in 160 Posts
    Because your form action is mailto which opens the associated mail program.
    To save time, lets just assume I am almost never wrong.

    The XY Problem
    The XY problem is asking about your attempted solution (X) rather than your actual problem (Y). This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.

    Make A Donation https://www.paypal.me/KevinRubio

  3. #3
    Regular Coder
    Join Date
    Oct 2011
    Posts
    595
    Thanks
    13
    Thanked 2 Times in 2 Posts
    So the code is wrong?

  4. #4
    Senior Coder benanamen's Avatar
    Join Date
    Oct 2015
    Posts
    1,640
    Thanks
    11
    Thanked 165 Times in 160 Posts
    Depends on what you want to do. If you don't want the mail program to handle the mail then you have to do it differently.
    To save time, lets just assume I am almost never wrong.

    The XY Problem
    The XY problem is asking about your attempted solution (X) rather than your actual problem (Y). This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.

    Make A Donation https://www.paypal.me/KevinRubio

  5. #5
    Regular Coder
    Join Date
    Oct 2011
    Posts
    595
    Thanks
    13
    Thanked 2 Times in 2 Posts
    I want people to be able to email me, there comments.

  6. #6
    Senior Coder benanamen's Avatar
    Join Date
    Oct 2015
    Posts
    1,640
    Thanks
    11
    Thanked 165 Times in 160 Posts
    Then you probably want to implement Php form processing to send the mail. For a simple feedback you can use the mail function.
    https://www.php.net/manual/en/function.mail.php
    To save time, lets just assume I am almost never wrong.

    The XY Problem
    The XY problem is asking about your attempted solution (X) rather than your actual problem (Y). This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.

    Make A Donation https://www.paypal.me/KevinRubio

  7. #7
    Regular Coder
    Join Date
    Oct 2011
    Posts
    595
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Thank you very much.

  8. #8
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,750
    Thanks
    5
    Thanked 539 Times in 525 Posts
    ... and whilst unrelated to your problem, it might help if you were building forms PROPERLY and ACCESSIBLY. Where's your <fieldset> and <label> tags?
    “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com

  9. #9
    Regular Coder
    Join Date
    Oct 2011
    Posts
    595
    Thanks
    13
    Thanked 2 Times in 2 Posts
    I tried another forum and it works. The only problem is. It sends me two copies of the email , and after hitting send. I get the following.


    Not Found

    The requested URL /reply.html was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache Server at Home - 1 Finger Trigger Photographer Port 80


 

Tags for this Thread

Posting Permissions

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