Forum Moderators: coopster
I found a php script and it works, it sends the results to my email, except for one field. I can only receive 2 fields while I need ot recive teh 3 of them.
I tried many combinations and each time, when I move things around, one of the fields is missing:
ok here is the short php script:
<?php
$email = $_REQUEST['email'] ;
$fullname = $_REQUEST['fullname'] ;
$breed = $_REQUEST['breed'] ;
mail( "somename@example.com", "Feedback Form Results",
$fullname, "From: $email" );
header( "Location: [example.com...] );
?>
If I add $breed, it does not show the email of the person filling the survey anymore. Why only one field $fullname or $breed works and not both?
Thanks for your help.
Cecile
[edited by: coopster at 1:23 pm (utc) on Nov. 1, 2004]
[edit reason] generalized url per TOS [webmasterworld.com] [/edit]
bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]])
and on of the examples is:
mail("somebody@example.com", "the subject", $message,
"From: webmaster@{$_SERVER['SERVER_NAME']}\r\n" .
"Reply-To: webmaster@{$_SERVER['SERVER_NAME']}\r\n" .
"X-Mailer: PHP/" . phpversion());
so perhaps your mail call should look a bit like:
$email = $_REQUEST['email'] ;
$fullname = $_REQUEST['fullname'] ;
$breed = $_REQUEST['breed'] ;
$message = "Fullname: $fullname\nBreed: $breed";
mail( "somebody@example.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: [example.com...] );
Welcome to Webmaster World
[edited by: coopster at 1:29 pm (utc) on Nov. 1, 2004]
[edit reason] generalized url [/edit]