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

sendmail.php

$myAddress = "blah@blah.com";

// validate email address
if (ereg("([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)", $emailfield))
{
// address is valid
}
else
{
$returnVal = "ERROR!";
$message = ("Email Address not valid.");
echo("&message=$message&returnVal=$returnVal&");
exit;
}

// BUILD EMAIL HEADERS
$headers = "From: $namefield < $emailfield> \r\n";

// SEND EMAIL
if (mail ($myAddress, 'My Web site - form feedback' , stripslashes($commentfield), $headers)) {
$returnVal = "SUCCESS!";
$message = "Thank you for your message.";
echo("&message=$message&returnVal=$returnVal&");
}
else
{
$returnVal = "ERROR!";
$message = "Message not sent at this time";
echo("&message=$message&returnVal=$returnVal&");
}


?>

No comments: