#!@php_exe@ header("HTTP/1.0 299 OK"); header("Content-Type: text/html"); /////////////////////////////////////////////////////////////////////// // CHANGE THE VALUES BELOW HERE /////////////////////////////////////////////////////////////////////// $SEND_TO = 'achowe@snert.com'; $SUBJECT = 'From the web form...'; /////////////////////////////////////////////////////////////////////// // CHANGE THE VALUES ABOVE HERE /////////////////////////////////////////////////////////////////////// $maxWidth = 0; foreach ($_GET as $name => $value) { if ($maxWidth < strlen($name)) $maxWidth = strlen($name); } foreach ($_POST as $name => $value) { if ($maxWidth < strlen($name)) $maxWidth = strlen($name); } $body = ''; $fmt = "%{$maxWidth}s: %s\n"; foreach ($_GET as $name => $value) { $body .= sprintf($fmt, $name, $value); } foreach ($_POST as $name => $value) { $body .= sprintf($fmt, $name, $value); } //mail($SEND_TO, $SUBJECT, $body); /////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////// ?>
Form Processing Example in PHPFormatted output of web form as would be seen in an email message (without decorations). This example does not send any actual email, though it could with some minor changes. = $body; ?> Return to HIBACHI |