Hi all
I am in the middle of setting up a php contact form for a client of mine and i am having problems reading the email upon when it arrives in my inbox on my hotmail account as it displays a blank From address in the address field in from field and since i am using windows live mail not sure what i did wrong heres a snippet of my php code.
Also on the other end is there any other way apart from captcha should i make my php contact form more secure from sending spam and what not?PHP Code:$subject=$_POST['sub'];
$message=$_POST['mess'];
$ctype=$_POST['ctype'];
$contact=$_POST['contact'];
$capt=$_POST['capt'];
if($sub="")
{
?>
<script type="text/javascript">
alert('The Subject is Empty please re-enter the subject.')
</script>
<?
}
else
{
//
if($msg="")
{
//
?>
<script type="text/javascript">
alert('The Message is Empty please re-enter the Message.')
</script>
<?
//
}
else
{
//
if($contact="")
{
?>
<script type="text/javascript">
alert('The Contact Method is Empty please re-enter the Way you wish to be contacted..')
</script>
<?
}
else
{
if($capt==$p)
{
$to = "demonhunterds@hotmail.com";
if($ctype="email")
{
//
$headers = "From".$contact."";
echo $headers;
/*mail($to,$subject,$message,$headers);
echo "Mail Sent,We will respond to you asap.";
*///
}
else if($ctype="phone")
{
$c="You can contact them on $contact";
mail($to,$subject,$message,$c);
echo "Mail Sent,We will respond to you asap.";
}
else if($ctype="mobile")
{
$c="You can contact them on $contact";
mail($to,$subject,$message,$c);
echo "Mail Sent,We will respond to you asap.";
}
else if($ctype="fax")
{
$c="You can contact them on $contact";
mail($to,$subject,$message,$c);
echo "Mail Sent,We will respond to you asap.";
}
}
else
{
?>
<script type="text/javascript">
alert('The Captcha Field is Empty please re-enter the word again.')
</script>
<?
}
}
//
}
//
}
Any help would be good,
Thanks,William









Bookmarks