View Single Post
Old 01-05-2013, 09:57 PM   PM User | #7
HQWebs
New Coder

 
Join Date: Jan 2013
Location: Bosnia And Herzegowina
Posts: 21
Thanks: 3
Thanked 0 Times in 0 Posts
HQWebs is an unknown quantity at this point
Quote:
Originally Posted by AndrewGSW View Post
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
HQWebs is offline   Reply With Quote