English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Here is the script...
FORM:


Your Email:


First Name:


Last Name:







HERE IS MY SENDMAIL.PHP FILE...

$email = $_REQUEST['email'] ;
$first_name = $_REQUEST['first_name'] ;
$last_name = $_REQUEST['last_name'] ;

mail( "caleb_5991@Yahoo.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.illustratedimagery.com/testsite/home.htm" );
?>


---- I HAVE ALREADY VERIFIED WITH MY HOST THAT OUR SERVER SUPPORTS PHP. WHAT AM I DOING WRONG.

Thanks, really appreciated.

2007-01-15 15:13:08 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

5 answers

Not too sure if there's a $_REQUEST syntax, but I know that there's a $_POST syntax.

$email = $_POST['email'] ;
$first_name = $_POST['first_name'] ;
$last_name = $_POST['last_name'] ;

You used "post" as your method, so the PHP form will also use $_POST syntax.

2007-01-15 15:18:48 · answer #1 · answered by ndmmxiaomayi 3 · 0 0

$message in your email function is undefined. Perhaps you were going to format the name and message into one variable called $message? Or perhaps you left out a line in your PHP

$message = $_POST['email'];

Don't forget you used the post method in your form

2007-01-15 23:20:36 · answer #2 · answered by teef_au 6 · 0 0

?php

@set_time_limit(0);

require_once 'smtp_mail.php';

$to = "expertphp@yahoo.com";
$from = "from@myaccount.com";
$subject = "Subject here";

$headers = "MIME-Version: 1.0\r\n".
"Content-type: text/html; charset=iso-8859-1\r\n".
"From: \"My Name\" <".$from.">\r\n".
"To: \"Client\" <".$to.">\r\n".
"Date: ".date("r")."\r\n".
"Subject: ".$subject."\r\n";

$message = "


html message

here
border=\"0\" alt=\"\">


";

$response = smtp_mail($to, $subject, $message, $from, $headers);

if($response[0]) echo "The message has been sent !
\n".$response[1];
else echo "The message can not been sent !
\n".$response[1];

?>
That is a working code in PHP.
http://www.php.net/manual/en/ref.mail.php
It says $responce not request, that other person that answered tagged it good.
Depends on PHP4 or PHP5 also, they are basically same, but minor diffs.

2007-01-15 23:31:17 · answer #3 · answered by Anonymous · 0 0

First, be sure that
Second, be sure that your host allows you to send mail.

2007-01-18 09:17:08 · answer #4 · answered by the DtTvB 3 · 0 0

try putting an @ sign in from of mail in the sendmail.php file...

2007-01-15 23:25:15 · answer #5 · answered by johnnymac 1 · 0 0

fedest.com, questions and answers