HTML and CSS Reference
In-Depth Information
340
Figure 16-5: Data entry form to be sent as an e-mail.
PHP CATCH AND SEND
Next, a PHP program catches the data sent from the HTML5 and sends it to the intended
recipient, the business owner. First, take a look at the PHP code in
mailer1.php
(available
in this chapter's folder at
www.wiley.com/go/smashinghtml5
). h en, you can see how
the e-mail is sent.
<?php
$name
;
$email
;
$comments
;
$subject
;
$eBiz
=
”waz@wazooHome.net”
;
if
(
isset
(
$_POST
[
'sender'
]))
{
$name
=
$_POST
[
“userName”
];
$email
=
$_POST
[
“mailNow”
];
$comments
=
$_POST
[
“talk”
];
$subject
=
$_POST
[
“subject”
];