#!@php_exe@ $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); /////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////// ?> Hibachi - Form Processing Example in PHP

Form Processing Example in PHP

Formatted 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.



Return to HIBACHI