• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Cyrillic characters PHP fix.

Started by ghm72, September 10, 2013, 05:23:22 PM

ghm72

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.

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'");

}