kmukund87 Posted September 23, 2010 Share Posted September 23, 2010 This problem seems very strange as it works perfectly fine when i use the phpmyadmin to update a field in my table but does not work when i use an sql command from php The text contains the letter "ó" and when executed from a php command, changes to a "?" and sits in the table. This problem does not occur when I use phpmyadmin Can someone please help me? Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/214233-the-character-%C3%B3-bug/ Share on other sites More sharing options...
chintansshah Posted September 24, 2010 Share Posted September 24, 2010 Can you please provide php code here for easily understand your problem. Quote Link to comment https://forums.phpfreaks.com/topic/214233-the-character-%C3%B3-bug/#findComment-1115176 Share on other sites More sharing options...
kmukund87 Posted September 24, 2010 Author Share Posted September 24, 2010 Hi, I just solved the problem 2 minutes ago by using htmlentities instead of htmlspecialchars to sanitize my sql inputs. So this thread can be considered solved . But anyway, here is the code UPDATE page_content SET message = '$message' WHERE uid= 12 and $message is simply "ó". This does not work and when i look in the DB, message is "?" . message is a VARCHAR (I also tried with TEXT yeilding the same result) Quote Link to comment https://forums.phpfreaks.com/topic/214233-the-character-%C3%B3-bug/#findComment-1115187 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.