ok me and felu sorted out the form and deleted stuff we changed, heres the php code now:
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('banned ip here (felus was here)');
for($i=0;$i<sizeof($spammers);$i++) {
if(strpos($ip, $spammers[$i])!==false) {
header('Location: contact_us_ban.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');
}
?>
But it doesnt seem to be working
EDIT: Yay it seems to be working now
Thanks Felu, WDZ and Nitemare appreciated