Results 1 to 3 of 3

Thread: Mail form problem

  1. #1
    Join Date
    Dec 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Mail form problem

    Hello,

    I've got a problem with my form.

    When I try to submit it, it says:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.


    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


    I've checked everything several times but it still doesn't work? And what are these 2 errors?

    My form web page: www.handelgate.com/news.html

    My processor script (I've used it before and it worked perfectly)

    <?PHP
    $mailto = "mail@mail.com";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Newsletter registration";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "
    Name: ".$name."
    Email: ".$email."
    :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);

    header("Location: http://www.handelgate.com/newsletter_thank_you.html");

    ?>

    My form code

    <form action="newsletter.php" method="post" name="newsletter" id="newsletter">
    <p class="news">Name
    <input name="name" type="text" id="name" size="17">
    </p>
    <p class="news">E-mail
    <input name="email" type="text" id="email" size="17">
    </p>
    <p class="news">&nbsp;</p>
    <p class="news"> <span class="news">
    <input type="submit" name="Submit" value=" Submit ">
    </span></p>
    </form>

    The same thing happens with other forms.

    Help, please!

    Thank you!

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Try changing this: $email = $HTTP_POST_VARS['email']; to this: $email = $_POST['email'];
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Dec 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I used this script but i have never received the form information through the mail....

    Php is executed (I can say that because it directs the user from My form to thanking page.)

    Whta should i do ??

    Please help me out..


    ___________________________________________________________________________________________________

    I found out that my server doesnt supports Php.
    Is there any other way of form processing through any other language ??
    PLs Help me .
    Last edited by shriniwas; 12-30-2007 at 07:34 PM.

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
  •