Replace mysql_* with mysqli_* for PHP 5.5 compatibility
Replace mysql_* with mysqli_* functions