37 users online (0 members and 37 guests)  


Page 1 of 2 1 2 Last
  Results 1 to 15 of 28

Related

  1. CSS Buttons and the Submit    Forum: CSS Forum
    Replies: 5
  2. Multiple Submit buttons    Forum: HTML Forum
    Replies: 3
  3. Submit / Reset / Browse Buttons    Forum: CSS Forum
    Replies: 1
  4. multiple submit buttons in single form    Forum: HTML Forum
    Replies: 7
  5. Images with submit buttons    Forum: HTML Forum
    Replies: 1
  1. #1
    ZIonsWrath's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    15

    Submit Buttons [in forms]

    Okay, I am making a simple website and I have a form all made up and everything. The only thing I can not figure out is how to make the submit button mail the form contents to me. I have the button but when you click it nothing happens. Please help me out.

  2. #2
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    Talking

    You'll need to post some code or a link to the site. (It's kinda hard to troubleshoot without seeing what you have now......)

  3. #3
    coreybryant's Avatar
    Texan at Heart

    Status
    Offline
    Join Date
    Jun 2003
    Location
    Castle Rock, CO
    Posts
    107
    What form processor did you choose? CGI, ASP, PHP - or are you using the mailto: command?

  4. #4
    ZIonsWrath's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    15
    Here is a sample of what I am trying to do as my site is not online yet:

    <html>
    <head>
    <title>Sample of Form</title>
    </head>
    <body>

    <h1 align=center>Test Form</h1>

    <hr width="20%" align="center">

    Spot 1
    <br>
    <textarea name="company" cols="25" rows="5" id="1"></textarea>
    <br>
    <br>
    Spot 2
    <br>
    <textarea name="company" cols="25" rows="5" id="2"></textarea>
    <br>
    <br>
    Spot 3
    <br>
    <input type="text" name="3" size="25">
    <br>
    <br>
    Spot 4
    <br>
    <input type="text" name="4" size="25">
    <br>
    <br>
    Spot 5
    <br>
    <input type="text" name="5" size="25">
    <br>
    <br>
    Spot 6
    <br>
    <input type="text" name="6" size="25">
    <br>
    <br>
    Spot 7
    <br>
    <input type="text" name="7" size="25">

    <p align="center"><input type="submit" name="Submit" value="Submit"></p>

  5. #5
    coreybryant's Avatar
    Texan at Heart

    Status
    Offline
    Join Date
    Jun 2003
    Location
    Castle Rock, CO
    Posts
    107
    Well you have no form tags. Check with whatever hosting company to see what they support, formmail, ASP, PHP, etc

  6. #6
    ZIonsWrath's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    15
    I know I am doing this all wrong and I *think* it is clear what I am trying to do, so can someone please make me a sample. I would greatly appreciate it.

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Heres a sample I wrote a while ago -
    http://www.ahfb2000.com/webmaster_he...=3166#post3166
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    ZIonsWrath's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    15
    too hard
    Last edited by ZIonsWrath; 11-11-2003 at 11:12 AM.

  9. #9
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Why dont you start with the forms tutorial , and work up from there?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  10. #10
    ZIonsWrath's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    15
    Okay i think i understand this but here is what I need help with

    <form action="mailer.php" method="post">

    that line...
    In the action what do I put to get it to just email all the stuff to an email address of mine?

    I tried doing the mailto: tag but it opens a new mail message but the contents I entered on the page do not appear in the body.
    Last edited by ZIonsWrath; 11-11-2003 at 11:15 AM.

  11. #11
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi,

    Edit mailer.php , find -

    PHP Code:
    $recipient "dean@somepeople.net"
    and change it to your email address.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  12. #12
    ZIonsWrath's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    15
    okay i put the mailer.php in the action part, made a new document, put that 1 line of code saved it as mailer.php and i get this error message



    Method Not Allowed
    The requested method POST is not allowed for the URL /zionswrath/wdb/Weapons Database/mailer.php.

    Apache/1.3.27 Server at homepage.mac.com Port 81



    Obviously I did something wrong, but what?
    [I put the site online temporarily so I could test it because browsing it on my computer it would just show me the folder that contained the php file]

  13. #13
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    to start with, mailer.php should be the entire script detailed in the post I linked to. You just amend that script to send to your email. On its own, that line wont do anything.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  14. #14
    ZIonsWrath's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    15
    Okay I did that and i still ge the same error:

    Method Not Allowed
    The requested method POST is not allowed for the URL /zionswrath/wdb/Weapons Database/mailer.php.
    Apache/1.3.27 Server at homepage.mac.com Port 81

    Here is the mailer.php script I am using:

    <?
    // Filename: mailer.php

    // Generic Emailer

    // Default Settings

    $redirect = "My_thank_you_page.html";



    // First, detects whether info is received via form -

    $recipient = "zionswrath@mac.com";

    $subject = "Advertising on WDB";

    $from = "From: My Website Emailer";

    $email = "
    ";

    $data = $HTTP_POST_VARS;

    foreach($data as $k => $v) {

    $k = stripcslashes($k);
    $v = stripcslashes($v);

    $email .= "\n$k : $v";



    }


    mail($recipient, $subject, $email, $from);

    header("Location: $redirect");



    ?>

    The problem seems to be not in the script but in the form tag. For the "method" tag I have "post" which gives me the error message above and when I put send it makes me download the actual mailer.php

    Sorry for not undertstanding how to do this and troubling you =[

  15. #15
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    This is not your fault, by the look of it.

    this seems to be a problem with your host, it does not allow the HTTP method POST, or the fact that it is a |PHP script. Does your host allow php?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Page 1 of 2 1 2 Last

Tags for this Thread