Hello how to check whether the user has uploaded profile pic or not...I have tried this code but only displays the default pic and not the else part..please help...this is my code
$check_pic = mysqli_query($conn,"SELECT image FROM users WHERE id='$id'");
$get_pic_row = mysqli_fetch_assoc($check_pic);
$profile_pic_db = $get_pic_row['image'];
$pro_num = mysqli_num_rows($profile_pic_db);
if ($pro_num == 0) {
$profile_pic = "http://localhost/Ramdhenu/images/default_propic.png";
} else {
$profile_pic = "http://localhost/Ramdhenu/userdata/Author_images/".$profile_pic_db ;
}