<?php include ('database.php'); $email = $_POST['email']; $query = $database->query("Select * from tbl_user where email = '$email' and password ='$password' "); $count = $query->rowcount(); $row = $query->fetch(); ?>
<?php if ($count > 0) { $_SESSION['id'] = $row['tbl_user_id']; } ?>
<script> alert("The combination of User Name and Password is invalid!") window.location = "index.php"; </script>
<?php include ('database.php'); $email = $_POST['email']; $query = $database->query("Select * from tbl_user where email = '$email' and password ='$password' "); $count = $query->rowcount(); $row = $query->fetch(); if ($count > 0) { $_SESSION['id'] = $row['tbl_user_id']; } else { ?> <script> alert("The combination of User Name and Password is invalid!") window.location="index.php"; </script> <?php } ?>