Errors:
Warning: mysql_query() expects parameter 1 to be string, object given in C:\xampp\htdocs\social_network\functions\functions.php on line 20
Warning: mysql_num_rows() expects parameter 1 to be resource, null given in C:\xampp\htdocs\social_network\functions\functions.php on line 21
I am using to connect:
$con = mysqli_connect("localhost","root","","social_network") or die("Connection was not established");
Code:
function InsertUser(){
    global $con;
if(isset ($_POST['sign_up'])){
    $name = $_POST['u_name'];
    $psss = $_POST['u_pass'];
    $email = $_POST['u_email'];
    $country = $_POST['u_country'];
    $gender = $_POST['u_gender'];
    $b_day = $_POST['u_birthday'];
    $name = $_POST['u_name'];
    $date = date("d-m-y");
    $status = "unverified";
    $posts = "No";
    $get_email = "select * from users where user_email='$email'";
    $run_email = mysql_query($con,$get_email);
    $check = mysql_num_rows($run_email);
    if($check==1){
        echo "<script>alert ('Email is already registered, please try another one!')</script>";
        exit();
    }
}
}
?>
