Results 1 to 4 of 4

Thread: Submit Form

  1. #1
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Submit Form

    I currently figured out my problem on my page and fixed it. BUT now i need to make sure my user can hit the submit button and it e-mails me the information and sends them to another page.

    What do i need to change in my coding to do this?

    http://www.****wallstreet.com/test/Buy.html is the page

    The thing is when you go to http://www.****wallstreet.com/test/

    you click any spot on the grid and it inputs and goes to the http://www.****wallstreet.com/test/Buy.html page. Then the properties appear in the X and Y section.

    I want it so that information is sent to my e-mail address and then it goes to lets say like whatever.html page ya know?

    Im a little confused on what to do! any help would be great! Thanks Alot!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You need a server-side language.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    what do you mean by a side server language or where do i get it at?

  4. #4
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Help!!!!!!!!!!!!!! Please!!!!!!!!!

    Im trying to figure out a form to send to my e-mail after the user fills it out.

    here's my mail.html file code

    ===========================<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>

    <body>
    <form action="mail.php" method="post">
    Your Name: <input type="text" name="name"><br>
    E-mail: <input type="text" name = "email"><br><br>
    Comments<br>
    <textarea name="comments"></textarea><br><br>
    <input type="submit" value="Submit">
    </form>
    </body>
    </html>
    =========================================

    then my mail.php file is
    =========================================
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <?
    function checkOK($field)
    {
    if (eregi("\r",$field) || eregi("\n",$field)){
    die("Invalid Input!");
    }
    }

    $name=$_POST['name'];
    checkOK($name);
    $email=$_POST['email'];
    checkOK($email);
    $comments=$_POST['comments'];
    checkOK($comments);
    $to="php@gowansnet.com";
    $message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email";
    if(mail($to,"Comments From Your Site",$message,"From: $email\n")) {
    echo "Thanks for your comments.";
    } else {
    echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
    }
    ?>
    <body>
    </body>
    </html>

    ======================================

    Im trying to figure out why it doesnt work. Everytime i click the submit button a thing pops up asking me if i want to download the mail.php file.
    Is there something wrong with this or what do i need to change?

Bookmarks

Posting Permissions

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