builders Posted January 31, 2012 Share Posted January 31, 2012 Hi i am new to this forum and general to php too. I would like to ask something about a form i created at php. I have the data of the form be saved at a database. The problem is with Greek chars when someone put in that then at sql ι have something like this "ΚώσÏ" I tried this at the header of my index.php <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> and this <form accept-charset="utf-8" ... > But nothing What should i do in order the data to be saved in sql utf-8 ? Thanks Link to comment https://forums.phpfreaks.com/topic/256131-character-issue-with-sql/ Share on other sites More sharing options...
Andy-H Posted January 31, 2012 Share Posted January 31, 2012 mysql_set_charset Link to comment https://forums.phpfreaks.com/topic/256131-character-issue-with-sql/#findComment-1313044 Share on other sites More sharing options...
The Eagle Posted January 31, 2012 Share Posted January 31, 2012 You can set it with mysql_set_charset(). <?php $con = mysql_connect('localhost','1234','1234'); mysql_set_charset('utf8', $con); ?> Link to comment https://forums.phpfreaks.com/topic/256131-character-issue-with-sql/#findComment-1313052 Share on other sites More sharing options...
builders Posted February 1, 2012 Author Share Posted February 1, 2012 Thanks that worked !!! Link to comment https://forums.phpfreaks.com/topic/256131-character-issue-with-sql/#findComment-1313259 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.