Re: Stripslashes help
| From: | Chris Shiflett | Date: | Tue, 09 Jul 2002 04:22:43 +0000 |
| Subject: | Re: Stripslashes help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-106226@lists.php.net to get a copy of this message | ||
Martin Towell wrote:
Chris S - I think you're confusing stripslashes w/ addslashes, but everything else I'm an agreement w/.You're absolutely right. *blush* Chris K - Ignore my last paragraph, and everything else should make at least partial sense. :-) Ignore this:
Well, here's where you're executing stripslashes() twice. See above. My suggestion is to not try to get your message into a variable that can be used in an SQL query and be sent in an email. You want these to use two different formats. For the email, leave the single quotes as they are; you don't want to see the escaped quotes. For inserting into the database, make sure they are escaped with stripslashes().Happy hacking. Chris