mas Ellyx aku nanya gimana cara membatasi login, seumpama user login 3x salah terus, maka firefox secara auto akan nutup mas, tolong mas ?
ini scrip login aku
<?php
session_start();
mysql_connect("localhost","root","") or die("Nggak bisa koneksi");
mysql_select_db("spk");//sesuaikan dengan nama database anda
$userid = $_POST['userid'];
$psw = $_POST['psw'];
$op = $_GET['op'];
if($op=="in"){
$cek = mysql_query("SELECT * FROM login WHERE nama='$userid' AND password='$psw'");
if(mysql_num_rows($cek)==1){
$c = mysql_fetch_array($cek);
$_SESSION['userid'] = $c['userid'];
$_SESSION['level'] = $c['level'];
if($c['level']=="admin"){
header("location:home.php");
}else if($c['level']=="user"){
header("location:home.php");
}
}else{
die("password salah <a href=\"javascript:history.back()\">kembali</a>");
header("location:index.php") ;
}
}else if($op=="out"){
unset($_SESSION['userid']);
unset($_SESSION['level']);
header("location:index.php");
}
?>