Hi, i have made a database using phpmyadmin. All encoding of the database is set to utf8_general_ci . The php code is written in UTF-8 without BOM. The problem is that despite the fact that i can insert greek characters via a login form, which appear properly inside the database tables, when i retrieve them they are displayed in the browser like this ???????. I checked some similar topics but could not figure some solution.
Cannot retrieve greek characters from database.
Collapse
X
-
Also, what software is between your database and your web browser? If you are using phpmyadmin and you can see the characters appropriately in the browser using that application but with the same browser using your application they do not appear properly I would say the issue is with your application.
We're going to need to see some source code in the areas of where you retrieve the data from the database and around where you display it to the user.Comment
-
Here is a function i use to fill a drop down list with enum values from my database
Code:function optionlist(){ $result=mysql_query('SHOW COLUMNS FROM mathimata WHERE field=\'examhno\''); while ($row=mysql_fetch_row($result)) { $r = $_GET['Result']; foreach(explode("','",substr($row[1],6,-2)) as $v){ if ($v==$r) { print("<option selected>$v</option>"); } else { print("<option>$v</option>"); } } } }Comment
-
It is PHP, sorry for the bad syntax/programming but it's been like a month since i started with php. Also another simple PHP function i used is this
Code:$sql = "SELECT firstname FROM `login` where id=\"5\""; $result = mysql_query($sql) or die('error'); $result = mysql_fetch_array($result); echo $result['firstname'];Comment
Comment