Add slashes saga
| From: | Herhuth, Ron | Date: | Tue, 11 Mar 2003 15:16:09 +0000 |
| Subject: | Add slashes saga | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-18973@lists.php.net to get a copy of this message | ||
I'm running into the old add slashes problem and I'm hoping someone might be nice enough
to help me out.
I created a form that lists all the last names in a database. Beside each name I have a checkbox
which contains a value of their last name and because the user might select multiple names, I am
assigning the values to an array (i.e. ...name="chkbox[]" value=O'brien...). I have
the form set to pass the select values via a POST, with Register Globals OFF.
On the following page I am printing out the selected names and in the example above (O'brien)
the script only prints out "O" I lose the "'brien" which is problematic. I
looked at the manual but I find it to be rather confusing on this point.
What code can I put in place to help alleviate this problem?
Thanks in advance!
Ron