Re: character problem
| From: | Ankur Verma | Date: | Tue, 13 Feb 2001 05:50:42 +0000 |
| Subject: | Re: character problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-39356@lists.php.net to get a copy of this message | ||
use stripslashes on the data being posted.
for ex if the text field name is varText
use $varText=stripslashes($varText)
That should take care of it
regards
Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India
----- Original Message -----
From: "John P. Donaldson" <johnpdonaldson@yahoo.com>
To: <php-general@lists.php.net>
Sent: Monday, February 12, 2001 10:11 PM
Subject: [PHP] character problem
> I've created a PHP script that is called from a form
> to send an email. The contents of the email is a
> hidden value in the form named "info," and is
> typically a paragraph of text. It works fine,
> however, for some reason, the apostrophy character
> always gets emailed looking like this: /'
>
> I've tried everything to get around this. Any ideas?
> Here's my script and form:
>
> Form:
>
> <form name="form1" method="GET"
> action="emailsender.php">
> <p>Email this product info to a friend</p>
> <input type="text" name="email">
> <input type="submit" name="Submit" value="Email Info">
> <input type="hidden" name="info" value="This is the
> text that gets emailed. I'm having problems with the
> apostrophe character in this text though">
> </form>
>
>
> Script file named emailsender.php:
>
> <?php
> print "<p>The product info has been mailed to:
> <b>$email</b>";
>
> $to = $email;
> $sender ="info@challenger.org";
>
> MAIL(
> "$email", # address to send $info email to
> "Product Info", # subject
> "$info", # hidden form field containing text to email
> "From: $sender\nX-Mailer: PHP/" . phpversion());
>
> ?>
>
>
> Thanks in advance,
> John
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net