RE: [PHP] Mail function acting a bit differently
| From: | Martin Towell | Date: | Wed, 03 Apr 2002 04:01:05 +0000 |
| Subject: | RE: [PHP] Mail function acting a bit differently | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-91260@lists.php.net to get a copy of this message | ||
the latter - you can't stripslashes() an array - okay, you can, but you're
going to get back the literal "Array"
no, you'll have to do each one seperately. so:
$form[message] = stripslashes($form[message]);
mail(...);
(personally, I put quotes around non-numerical indexes, but anyway) would be
the way to go
Martin
-----Original Message-----
From: lmlweb [mailto:junkit@lmlweb.com]
Sent: Wednesday, April 03, 2002 2:00 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Mail function acting a bit differently
Hosted web, so option to turn on or off is up to the hosting company, not
me.
stripslashes what?
$form = stripslashes($form);
mail(...);
or
$form[message] = stripslashes($form[message]);
mail(...);
"Martin Towell" <martin.towell@world.net> wrote in message
news:6416776FCC55D511BC4E0090274EFEF508A146@exchange.world.net...
> stripslashes() should work - or set the magic quote thingy to off
>
> -----Original Message-----
> From: lmlweb [mailto:junkit@lmlweb.com]
> Sent: Wednesday, April 03, 2002 1:12 PM
> To: php-general@lists.php.net
> Subject: [PHP] Mail function acting a bit differently
>
>
> I got an email someone submitted through my web form. I've been using this
> form for a while, and it had always worked. It still works, but something
> new has popped up.
>
> If someone writes, "I'm available to meet with you anytime. We'll talk
about
> our project."
>
> It appears as: I\'m available to meet with you anytime. We\'ll talk about
> our project.
>
> The mail() function as shown:
> mail("$recipientname
<$final_recipient>","$form[subject]","$form[first_name]
> $form[last_name] ($form[email]) send the following message to
$recipientname
> ($final_recipient) : \n\n $form[message]\n\n Name: $form[first_name]
> $form[last_name] \n Email: $form[email] \n Subject: $form[subject] \n",
> "From: $form[first_name] $form[last_name] <$form[email]>\nReply-To:
> $form[first_name] $form[last_name] <$form[email]>\nContent-type:
> text/plain\nX-Mailer: PHP/" . phpversion());
>
> Only a week or so ago, I've switched server machines from the one that had
> version 4.0.4pl1 (my old server) over to a new server that has version
> 4.1.2.
>
> The other differences I can see from these two is that the 4.1.2 version
> has magic_quotes_gpc on, where the other one didn't.
>
> How would I set this up so that the comments posted in my forms doesn't
get
> addslashed? I tried adding the stripslashes, but what happened was I get
an
> email with no data in it.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php