Replaced all mysql_real_escape_string with mysqli_real_escape_string.
Replaced all mysql_escape_string with mysqli_escape_string.