I am having an issue trying to check whether user email is available or no in database so, that i can send him ...an email with his password .....am stuck in if statement that count the number of rows in query result........hoping positive reply ....
if(isset($_POST['email']))
{
$email=$_POST['email'];
$query="SELECT email FROM signup WHERE email='" .$email." ' ";
$result=mysqli_query($connect,$query) ;
$num_rows = mysqli_num_rows($result);
if(mysqli_num_rows($result)==0){
echo "user exist";
}
}