?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?405 Error?
Author:??(---.glst3401.nj.comcast.net)
Date:???07-15-03 09:15

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

Comfirm by phone?
$confirm by phone";


//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'];
$projectdescription =$_POST['projectdescription'];
$confirmbyphone =$_POST['confirmbyphone'];

//mail() function sends the mail
mail($recipient,$subject,$message,$email);

?>

?Re: 405 Error?
Author:??(---.cpe.net.cable.roger)
Date:???07-15-03 11:06

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);

?>

Go to Top??|??Go to Topic??|??Threaded View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??

Provided By
Phorum