Re: Problem with Picture Name
| From: | Richard Davey | Date: | Wed, 07 Jan 2004 04:11:48 +0000 |
| Subject: | Re: Problem with Picture Name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173945@lists.php.net to get a copy of this message | ||
Hello Dimitri,
Wednesday, January 7, 2004, 4:06:25 AM, you wrote:
DM> I had it perfect so that when someone uploaded a picture in a form, it
DM> uploaded to my server and saved the image name etc. in the database. The
DM> problem is, what if someone tries saving a picture with an apostraphe ie (
DM> ' ) or ( " )? I know this isn't a usual format, and I tried htmlsecialchars
DM> ENT_QUOTES but it still saves the picture name onto the server like such:
DM> photo\'.jpg.
Strip them out (use the stripslashes() function) before saving to SQL.
--
Best regards,
Richard mailto:rich@launchcode.co.uk