HTML and CSS Reference
In-Depth Information
will be very simple and provide users with a comment section they can use for your Web
page.
h e basics of making an e-mail application center around the
mail()
function in PHP. h e
mail()
function expects three or four parameters. In the i rst e-mail application, only the
i rst three are used.
A SIMPLE E-MAIL APPLICATION
h e i rst thing you want to do in an e-mail application is set up the HTML5 portion of your
HTML5-PHP pair to provide a clear entry for users. Using the validation checking built into
some of the input forms (
onInvalid
), you can prevent users from inadvertently sending an
e-mail, phone number, or URL or other form data that are incorrectly formatted. So, this i rst
HTML5 e-mailer will (again) use the e-mail input form and use the
onInvalid
event
handler. h e following program (
EZmailer.html
in this chapter's folder at
www.wiley.
com/go/smashinghtml5
), should be fairly familiar.
<!
DOCTYPE HTML
>
<
html
>
<
head
>
<
script
type
=
”text/javascript”
>
MailMaster=new Object();
MailMaster.eMess=function()
{
alert(“Hmmmm... It seems that the e-mail entry has something out of sort. . . .
Please take a look at it and see if you can fix it up.”)
338
}
</
script
>
<
style
type
=
”text/css”
>
/*DDDCC5,958976,611427,1D2326,6A6A61 */
body {
background-color:#DDDCC5;
color:#1D2326;
font-family:Verdana, Geneva, sans-serif;
}
h2 {
background-color:#958976;
color:#DDDCC5;
text-align:center;
font-family:”Arial Black”, Verdana, Arial;
}
h3 {
color:#611427;
}
fieldset {
color:#6A6A61;
}
</
style
>