When I submit my form I get the following error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, support@supportwebsite.com 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.
Apache/1.3.33 Server at www.flowersells.com Port 80
I used PHPFORM WIZARD to create a script to process my web form, and it works fine, except when I recreated the script using the wizard to send an autorespond email to the visitor upon submission of the form. Thats when I get the error... otherwise it would work fine.
Here's some information you may need to know.
Hosting Company: Godaddy
Script Code:
<?php
# ----------------------------------------------------
# -----
# ----- This script was generated by PHP-Form Wizard 1.2.5 on 17/12/2007 at 11:40:25 AM
# -----
# ----- http://www.tools4php.com
# -----
# ----------------------------------------------------
// Receiving variables
@$pfw_ip= $_SERVER['REMOTE_ADDR'];
@$redirect = addslashes($_POST['redirect']);
@$Name = addslashes($_POST['Name']);
@$Email = addslashes($_POST['Email']);
@$Location = addslashes($_POST['Location']);
@$Minimum = addslashes($_POST['Minimum']);
@$Maximum = addslashes($_POST['Maximum']);
@$Beds = addslashes($_POST['Beds']);
// Validation
if (strlen($Name) == 0 )
{
header("Location: ://www.flowersells.com/error");
exit;
}
if (strlen($Email) == 0 )
{
header("Location: ://www.flowersells.com/error");
exit;
}
if (strlen($Location) == 0 )
{
header("Location: ://www.flowersells.com/error");
exit;
}
if (strlen($Minimum) == 0 )
{
header("Location: ://www.flowersells.com/error");
exit;
}
if (strlen($Maximum) == 0 )
{
header("Location: ://www.flowersells.com/error");
exit;
}
if (strlen($Beds) == 0 )
{
header("Location: http://www.flowersells.com/error");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $Email\n"
. "Reply-To: $Email\n";
$pfw_subject = "Form Submission";
$pfw_email_to = "flowerj@sympatico.ca";
$pfw_message = "Visitor's IP: $pfw_ip\n"
. "redirect: $redirect\n"
. "Name: $Name\n"
. "Email: $Email\n"
. "Location: $Location\n"
. "Minimum: $Minimum\n"
. "Maximum: $Maximum\n"
. "Beds: $Beds\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
//Sending auto respond Email to visitor
$pfw_header = "From: jflower@royallepage.ca\n"
. "Reply-To: jflower@royallepage.ca\n";
$pfw_subject = "New Listing Alerts - Confirmation";
$pfw_email_to = "$Name";
$pfw_message = "This is to confirm we have received your request to send new listing alerts to you via email.\n"
. "\n"
. "Should you see something you like, please let us know.\n"
. "\n"
. "Jeff Flower\n"
. "Sales Representative\n"
. "Royal LePage ProAlliance Realty";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: http://www.flowersells.com/success");
?>
Any thoughts would be greatley appreciated!
Thanks.