Felu
Veteran Member
Posts: 2223 Reputation: 72
30 / /
Joined: Apr 2006
Status: Away
|
RE: Website Help :)
You didn't get me right
For the php
code: <?php
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "admin@haboz.net";
$Subject = "Contact Us";
$Name = Trim(stripslashes($_POST['HabboName']));
$Query = Trim(stripslashes($_POST['Query']));
$Ip = $_SERVER[REMOTE_ADDR];
$spammers = array(
'IP 1',
'IP 2',
'IP 2'
);
for($i=0;$i<sizeof($spammers);$i++) {
if(strpos($ip, $spammers[$i])!==false) {
header('Location: contact_us_spammer.php');
}
}
// validation
$validationOK=true;
if (Trim($EmailFrom)=="") $validationOK=false;
if (!$validationOK) {
header('Location: contact_us_error.php');
}
// prepare email body text
$Body = "";
$Body .= "Habbo Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "IP: ";
$Body .= $Ip;
$Body .= "\n";
$Body .= "Query: ";
$Body .= $Query;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
header('Location: contact_us_ok.php');
}
else{
header('Location: contact_us_error.php');
}
?>
This post was edited on 03-09-2007 at 07:23 AM by Felu.
|
|