When using FCk it is not changing my ' symbol to the correct ascii code and there for killing the PHP insert. Can anyone help, Where can i set it up so that ' is in inserted properly or should i just redownload?
Tue, 11/18/2008 - 12:20
#1
Re: ' Symbol is killing my PHP
Do a search on quot in the files fckeditorcode_ie.js and fckeditorcode_gecko.js in the folder 'fckeditor/editor/js', when you find '"':'quot' you're in the right place. This is a string that contains the characters the FCK editor replaces automatically, add ,"'":'#39' to it and save the files.
Now you shouldn't have any problems any more with '.
Re: ' Symbol is killing my PHP
Now you just have a big SQL injection problem.
Re: ' Symbol is killing my PHP
How's that? The ' is replaced by ' in the source, which goes to the database.
Re: ' Symbol is killing my PHP
Re: ' Symbol is killing my PHP
Didn't think of that because I use a custom function that retrieves a piece of information from a form and does (amongst others) a few replaces to prevent SQL injection.
@laims7:
alfonsoml is right, the correct way to get rid of your problem is to replace the ' in PHP after you retrieve the information from the form.
Re: ' Symbol is killing my PHP
@seloh If you're saving anything to database, mysql_real_escape_string() is your friend (or any other *escape_string function in PHP if using other database). Be sure to read note about magic_quotes_gpc setting.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: ' Symbol is killing my PHP
Re: ' Symbol is killing my PHP