theuedimaster
06-18-2004, 04:05 PM
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
I have no idea about the logic of how this works, if anyone could explain to me about this script, PLEASE HELP!
This is a piece of the original script off of http://webdevfaqs.com/php.php#mailer
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
I have no idea about the logic of how this works, if anyone could explain to me about this script, PLEASE HELP!
This is a piece of the original script off of http://webdevfaqs.com/php.php#mailer