Re: What if this code is right ? It worked perfectly for years!!
| From: | Ashley Sheridan | Date: | Mon, 24 Aug 2009 16:48:21 +0000 |
| Subject: | Re: What if this code is right ? It worked perfectly for years!! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297136@lists.php.net to get a copy of this message | ||
On Mon, 2009-08-24 at 12:26 -0400, Paul M Foster wrote:
> On Mon, Aug 24, 2009 at 09:12:19AM -0700, Chris Carter wrote:
>
> >
> > Hi,
> >
> > The code below actually takes input from a web form and sends the fields
> > captured in an email. It used to work quite well since past few years. It
> > has stopped now. I used Google's mail servers (google.com/a/website.com)
> >
> > <?
> > $fName = $_REQUEST['fName'] ;
> > $emailid = $_REQUEST['emailid'] ;
> > $number = $_REQUEST['number'] ;
> > $message = $_REQUEST['message'] ;
> >
> > mail( "chris@gmail.com", $number, $message, "From: $emailid" );
> > header( "Location:
> > http://www.thankyou.com/thankYouContact.php" );
> > ?>
> >
> > This is the simplest one, how could it simply stop? Any help would be
> > appreciated, I have already lost 148 queries that came through this form.
>
> As a test, change $_REQUEST above to $_POST (assuming POST method on the
> form), and try it.
>
> Also check the return value of the mail() function to see if it thinks
> it has succeeded or failed. If it fails, check the mail logs on the
> server to find what the mail server thinks is wrong.
>
> Paul
>
> --
> Paul M. Foster
>
The $_REQUEST will not have anything to do with it. $_REQUEST contains
any values sent by POST.
Thanks,
Ash
http://www.ashleysheridan.co.uk