airnine
January 11th, 2004, 06:26 PM
Hi guys,
I use php and javascript 99% of the time and have a question that's really been bugging me for a while. I have solved it now, but would still like to know how other people deal with this type of things. In both php and javascript one can choose to use either single quotes or double quotes, but what do you do when you pull a message from mysql table that contains double quotes and put it in a php generated javascript alert message? Do you replace " with \" or go for char(34) or some third thing?
Airnine
I use php and javascript 99% of the time and have a question that's really been bugging me for a while. I have solved it now, but would still like to know how other people deal with this type of things. In both php and javascript one can choose to use either single quotes or double quotes, but what do you do when you pull a message from mysql table that contains double quotes and put it in a php generated javascript alert message? Do you replace " with \" or go for char(34) or some third thing?
Airnine