handling quotes in text to be inserted

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
drjones
Forum Newbie
Posts: 2
Joined: Wed Jul 10, 2002 5:33 pm
Location: Left Coast, US

handling quotes in text to be inserted

Post by drjones »

using PHP - trying to insert text with quotes in it - I have escaped the slashes in the text, but a user has stumped me by using multiple sets of double quotes.

The sql insert string is built dynamically.

Here's hoping that the fix is easy.

:?:
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

Code: Select all

addslashes($stringIWantToHaveCharsEscapedIn);
Post Reply