You are here: Re: php form 'sometimes' works « PHP Programming Language « IT news, forums, messages
Re: php form 'sometimes' works

Posted by Colin Fine on 01/11/06 01:21

bokke wrote:
> 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
>

"I had a car that used to run, but one day it stopped working. Can
anybody tell me what's wrong with it?"

If you gave us the slightest hint of what it actually does when it
'stops working' we might be able to make some useful suggestions.

Colin

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация