Author Topic: Cyrillic characters PHP fix.  (Read 7320 times)

DJ Garybaldy

  • Global Moderator
  • Hero Member

  • Offline
  • *****
  • 4671
  • Personal Text
    Don't Shoot! I'm only the Moderator
    • DJ Garybaldy Blog
Cyrillic characters PHP fix.
« on: September 10, 2013, 05:23:22 PM »
Thanks to wwwhelp for this one. If you have Issues getting Cyrillic characters to display properly on your PHP website then this piece of code will help you.

Code: [Select]
function db_conn() {
global $opened_db, $mysql_server, $mysql_user, $mysql_pass, $mysql_database;

@$opened_db = mysql_connect($mysql_server, $mysql_user, $mysql_pass);

if (!$opened_db) {

echo '<p>For the moment, our server is off-line.<br />Please come back later...</p>';
require_once('footer.php');

die();

} else {
@mysql_select_db($mysql_database)
or die(mysql_error());
}

mysql_query("SET NAMES 'utf8'");

}
Proud USER of RadioDJ since 2010

RadioDJ is my most FAVOURITE piece of software EVER

https://djgarybaldy.blogspot.com

Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

Radio: https://djgarybaldy.blogspot.com/p/radio.html