Forum Moderators: open
When I run this query
$sql = "INSERT INTO forum_users (id, username, realname) VALUES (NULL, 'bernard', _utf8'thomas\'de;\'-(à-é(-')";
1/ Using php (on a webpage), it fails to insert special character in the database and I get
thomas\'de;\'-(
2/ In my phpMyAdmin, it works fine and I get
thomas\'de;\'-(à-é(-')
Any idea why?
Spent already my morning trying to find what's wrong, bouhouhouh!
NB. Use of mb_internal_encoding("UTF-8"); and mysql_query("SET NAMES 'utf8'"); AND Apache 1.3.33 - PHP 4.3.10 - MYSQL 4.1.9
It's not useless if someone else makes the same mistake. Maybe, though, instead of commenting it out they never include it at all (which is relatively the same thing, anyway).
My view is, if it can happen to you, it can happen to any one of us. ;)
Glad you got it!