I'm getting a 405 Error on this script...? i can't seem to figure out why? can anyone tell me what I might have done wrong? I am very new to this
//Declare the variables
$recipient = "[email protected]";
$subject = "Bid Form";
$message = "Hello! $firstname $lastname from $company has just completed
the Bid Form. Their contact information is:
$address
$city
$state
$zip
$phone
$fax
$email
The description they gave for their project is as follows:
$project description
couple of things here:
1. get the form contents first
2. the from email is actually an optional header - added the code in - see comments
//Contents of form
$firstname =$_POST['firstname'];
$lastname =$_POST['lastname'];
$company =$_POST['company'];
$address =$_POST['address'];
$city =$_POST['city'];
$state =$_POST['state'];
$zip =$_POST['zip'];
$phone =$_POST['phone'];
$fax =$_POST['fax'];
$email =$_POST['e_mail']; //hypehn causes a problem...use a underscore or just make it one word
$projectdescription =$_POST['projectdescription'];
$confirmbyphone =$_POST['confirmbyphone'];
/*
//add the headers to create the html email if you want it
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
*/
//set the from side of the email - shows as firstname space lastname
$headers .= "From: $firstname." ".$lastname<$email>\nX-Mailer: PHP Automated Mailer";
//Declare the variables
$recipient = "[email protected]";
$subject = "Bid Form";
$message = "Hello! $firstname $lastname from $company has just completed
the Bid Form. Their contact information is:
$address
$city
$state
$zip
$phone
$fax
$email
The description they gave for their project is as follows:
$project description
Comfirm by phone?
$confirm by phone";
//mail() function sends the mail
mail($recipient,$subject,$message,$email);