Added logic to switch between: mysqli_connect & mysql_connect