[Wolves] script for web form
roundyz
roundyz at hotpop.com
Thu Sep 22 23:19:19 BST 2005
where would i put this script?
its so a form can call it and mail me of the info in the form fields.
its php, a guy offered it to me on irc, but he had to leave before he could
explain how to use it.
<?
$MsgBody = ""; // don't delete me plzkthx
$TargetEmail = "roundyz at hotpop.com";
$Subject = "Web Enquiry";
$From = $TargetEmail; // Only change this if you want to reply to a
different address
$Redirect = ""; // Put a URL in the quotes if you want to redirect the
user
foreach($_POST as $Key => $Value)
{
$MsgBody .= htmlentities(Key).":".htmlentities($Value)."\r\n";
}
// Send the mail
mail($TargetEmail, $Subject, $MsgBody,
"From: ". $TargetEmail."\r\n"
."Reply-To: ". $TargetEmail."\r\n"
);
if (strlen($Redirect)>0)
{
header("location: ". $Redirect."\r\n");
}
?>
--
Thanks,
Matt
(roundyz)
-=contact=-
skype:roundyz
mailto:roundyz at hotpop.com
-=sites=-
http://www.roundyz.com <-- Photography site.
http://teampink.roundyz.com <--Halo 2 clan
More information about the Wolves
mailing list