In article <RmCnb.1014$>,
"Bryce" <> wrote:
> > Write your own form handler that has the address hard-coded within the
> > script.
> well, that was pretty god damn useful!
Quick setup for a mailto form in PHP:
<?
// if form is submitted to itself
if($send) {
// check required fields
if($field1 && $field2 && $field3) {
// compose your e-mail here and have PHP send it.
// ...
$sent = 1;
} else $error = 1;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>
</title>
</head>
<body>
<?
if($sent) {
// form sent
?>
<!-- insert your thankyous here -->
<?
} else {
// form not yet sent, or returned with errors
?>
<? if($error) echo "<strong>Wake up! Complete that form.</strong>"; ?>
<form ...>
<!-- your form here -->
<input type="hidden" name="send" value="1">
</form>
<?
}
?>
</body>
</html>
--
Kris
erlands (nl)