|
Posted by bokke on 01/10/06 04:52
Can someone please help me with this?
I have a form that I use on most of my sites - they all worked fine -
then one day they stopped working. here is the code
<?
$name=$_POST['name'];
$phone=$_POST['phone'];
$email=$_POST['email'];
$email = preg_replace( '/[\r\n]/', '', $email );
$comment=$_POST['comment'];
$to="myname@yahoo.ca";
$message="The E-mail is From:$name\n\nTheir Phone Numbers
is:$phone\n\nTheir e-mail address is: $email\n\nThey
wrote:\n\n$comment";
if(mail($to,"E-mail from myname.ca",$message,"From:$email\n")){
echo "Thank you $name. Your Information has been sent successfully.
We will contact you shortly.";
}else{
echo"There was a problem sending the messages. <br> <a href='mailto:
myname@yahoo.ca'>Please click here to e-mail us</a>";
}
?>
I know the page is getting the info from the first page because if I
change the last line to include $name $phone etc it all appears.
The preg_replace is purely for spammers.
Where is the error? Any ideas? An aside here - On two of my sites it
runs fine (a different hosting company though) but this hosting company
refuses to say it's on their end? - Either way I need this to start
working yesterday. Please help.
michael
Navigation:
[Reply to this message]
|