<?php
function checklogin($conn,$username,$password){
$sql = "SELECT email, password FROM jobseeker WHERE email='".$conn->real_escape_string($username)."'
AND password='".$conn->real_escape_string($password)."'";
$result = $conn->query($sql);
if ($result->num_rows>0) {
while ($row = $result->fetch_assoc()) {
$_SESSION["userlogin"] = $row["email"];
}
return 1;