<?php
session_start();
include "connect.php";
$nim = $_POST['nim'];
$password = $_POST['password'];

    $cek = mysqli_query($koneksi,"SELECT * FROM user_mhs WHERE nim='$nim' AND password=md5('$password')");
    if(mysqli_num_rows($cek)==1){//jika berhasil akan bernilai 1
		$c = mysqli_fetch_array($cek);
	$_SESSION['nim'] = $c['nim'];
	
	
header("location:menumhs.php");


    }else{
         die("password salah <a href=\"javascript:history.back()\">kembali</a>");
    }

?>