i have function connect()
function connect(){
    $host = '';
    $name = '';
    $pass = '';
    $port = '';
    $db = '';
    $con = mysqli_connect($host,$name,$pass,$db,$port) or die (mysqli_connect_error());
    return $con;
}
And i have function check_exists
function check_exists($username){
    $num = mysqli_num_rows(mysqli_query($con,"SELECT * FROM `accounts` WHERE `user` = '$username'"));
    return $num;
}
but check_exists don`t know what variable $con is. How can i make that check_exists will know what $con is?
 
     
     
    