I want to prevent unpaid user from log in in my website and this codes my login page php codes.
enter <?php session_start();
include_once('includes/config.php');
if(isset($_POST['login']))
{
$pass=md5($_POST['password']);
$useremail=$_POST['uemail'];
$ret= mysqli_query($con,"SELECT id,fname FROM users WHERE email='$useremail' and
password='$pass'");
$num=mysqli_fetch_array($ret);
if($num>0)
{
$_SESSION['id']=$num['id'];
$_SESSION['name']=$num['fname'];
header("location:welcome.php");
}
else
{
echo "<script>alert('Invalid username or password');</script>";
}
}
?>
and mysql table: id username email password paid_unpaid
in this database I want prevent unpaid user from access to website