Welcome to Web Design I

In this course, you will design a web site with transception, using evolutionary guidance media.

A five phase development structure will help shape the design and delivery process.
There are two major deliverables:
1) prototype and
2) the final site.

thedigitalprofessor

Friday, March 27, 2009

form_mailer example code from KIRUPA

http://www.kirupa.com/web/form_mailer.htm



$date = date ("l, F jS, Y");
$time = date ("h:i A");

$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";
}
}

mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
echo "Thank you for submitting our form. We will get back to you as soon as possible.";
}

?>

No comments: