Log in

View Full Version : Mail form problem



Dmakk
12-29-2007, 04:40 PM
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!

tech_support
12-30-2007, 12:36 AM
Try changing this: $email = $HTTP_POST_VARS['email']; to this: $email = $_POST['email'];

shriniwas
12-30-2007, 01:37 AM
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 .