Quote:
Originally Posted by AndrewGSW
email injection
The following is not very effective in this regard:
PHP Code:
if($_POST["stripHTML"] == 'true'){
$messageBody = strip_tags($messageBody);
}
|
I am not using this code anymore , I am using this code now :
PHP Code:
<?php header("Refresh: 5;url=http://www.hqwebs.eu/contacts.html");
$to = "hqwebs.eu@gmail.com";
$name=$_POST['name'];
$phone = $_POST['phone'];
$email = $_POST ['email'];
$message = $_POST['message'];
$headers = "From:" . $email;
mail($to,$name,$message,$headers);
if(mail){
echo "<html>";
echo "<head>";
echo "<title>HQWebs - Mail Sent</title>";
echo "</head>";
echo "<body bgcolor='#000000'>";
echo "<center><img src='http://www.hqwebs.eu/images/mailsent.jpg'></center>";
echo "</body>";
echo "</html>";
}else{
echo "Cannot Send your mail for error";
}
?>
But This Phone field is not working , when you send an message i got , e mail , name , text message from sender , but there is not the phone number , what should i do to fix that too ?
Thank you