Hey
I am programming a webpage where the user can upload galleries of his own. When doing so the system creates a subfolder for the images with the same name as the gallery, a reference to the gallery is added as a row in a table and a separate table is also made for the gallery, containing a list of images.
When I try to create a new gallery everything works fine as long as there are no Western European signs. If I for instance name the gallery "beär" I will get an error, "Table 'databasename.beär...' doesn't exist.
The table does however exist with the correct name, I have tried printing out the variable $sub (That represents the gallery name in the query) right before the mysql query that returns an error, it prints correctly.
Also tried mysql_query("SET NAMES 'latin1'", $connection))) and the same with UTF-8 latin1 does nothing, UTF-8 screws everything over even more (The gallery name will actually then be beär).
The text files are encoded in ISO 8859-1, the charset definition is also ISO 8859-1
this is the query:
if(!($result = @ mysql_query("SELECT * FROM {$database}.`{$sub}`
ORDER BY item_id DESC", $connection)))
{showerror();}
Any help is greatly appreciated