View Single Post
Old 07-11-07, 03:17 PM   #13
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: Storing Javascript into MYSQL

I wouldn't sanitize JavaScript, it's code, treat it as code. Escape it using mysql_real_escape_data() so the DB will accept it as code, you should then be able to echo it out of the db result set and have it be processed correctly. I think your data sanitization (as string) is removing invalid 'string' characters.
evilghost is offline   Reply With Quote