Prev | Current Page 413 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

For instance, the
Snub Communications mail form has snubcommunications.com and the site??™s IP address
for this value (as a space-delimited list). If you use localhost, that enables local testing, if
you have the relevant software set up on your PC.
@referers = qw(dave.org.uk 209.207.222.64 localhost);
The @allow_mail_to value contains the addresses to which form results can be sent, again
as a space-delimited list. If you include just a domain here, then any address on that
domain is valid as a recipient. If you??™re using only one address, set the $max_recipients
value to 1 to increase security.
@allow_mail_to = qw(you@your.domain some.one.else@your.domain
?? localhost);
Note that some browsers display an outline where hidden fields are if input elements
are set to display as block. In such cases, you can apply a class value of hidden to
the relevant fields, with display set to none.
GETTING USER FEEDBACK
327
8
Multiple recipients
You can also use the script to e-mail multiple recipients. To do so, an additional hidden
input element is needed in the HTML:

And in the script itself, two lines are changed. The @allow_mail_to value is removed,
because it??™s catered for by the newly amended %recipient_alias. Both are shown here:
@allow_mail_to = ();
%recipient_alias = ('emailgroup =>
?? 'your-name@your.domain,your-name@somewhere-else.domain');
Should a script be used for multiple groups of recipients, you need a unique value for each
in the HTML and to amend the %recipient_alias value accordingly:
%recipient_alias = ('emailgroup1' => 'your-name@your.


Pages:
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425