Greek characters in php


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I'm making a script and I m using for first time greek characters.
I started to write a simple drop down menu that loads some city names from the
database. The names are in Greek in the database and the database is set in utf8_general_ci,
but in the drop down was appearing only some "?????????" question marks.

I also add this in the code in the head part
<meta http-equiv='Content-Type' content='text/html; charset utf-8'/>

and finally I added this in the file I make the connection with the database
mysql_query("SET NAMES 'utf8'", $conn);

after the final addition the characters changed from question marks and now the drop down
appears like this


I think I m close to solve it, but probably I m missing something.
If anyone knows something I would appreciate it.

Thank

No comments posted yet

Your Answer:

Login to answer
72 Like 24 Dislike
Previous forums Next forums
Other forums

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been

am I using this for loop correctly
Dear buddies!

Right now I am generating a report with some details for all the dealers.

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

PHP hyperlinks generator
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how

My XSRF Prevention code isn't working
First of all, thanks for the generous help you guys have given me in the past on this forum.
Seco

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

losing session vars when arriving from an email link
Hi,

I've got a confirmation script made that sends an email with a link for a user to confirm

Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash