I can get it to work by adding this:

--> $query = "SET NAMES 'utf8'";
--> $result = mysql_query($query) or die ("Error in query: $query. " .
mysql_error());
$query="INSERT INTO members (username, password, name, email, gender,
country, nationality, language, dob, phone)
VALUES('$username','$password','$name','$email','$gender',$country,$nationality,$language,'$dob','$phone')";
$result = mysql_query($query) or die ("Error in query: $query. " .
mysql_error());

...but I don't want to have to SET NAMES all the time.

I made the following changes to /etc/my.cnf

[client]
default-character-set=utf8

[mysqld]
init-connect=SET NAMES 'utf8'
collation_server=utf8_unicode_ci
character_set_server=utf8
default-character-set=utf8

I can see in phpMyAdmin that the changes have been made to the system
variables, but still the only way it works is to send the SET NAMES
'utf8' query via PHP. What am I missing?

Thanks,

Rich

--
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to