login

session_start();

include db_conn.php";

if (isset($_POST['Login'])){
$sql_login = "select * from login where no_id = '$_POST[no_id]' and pass = '$_POST[password]'";
$res_login = mysql_query($sql_login);
$row_login = mysql_fetch_array($res_login);
}
if ($row_login) {
$_SESSION['no_ic'] = $_POST['no_ic'];
header("location:home.php");
exit();
}
else{
echo "No user found";
}

simple php tutorial

0 comments:

Post a Comment