Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as PHP by haripinter ( 15 years ago )
<?php
ob_start();
include ("../tpkkoneksi.php");
session_start();
if(@$_POST['proses']=="Login"){
$user=@$_POST['txtuser'];
$pass=md5(@$_POST['passwd']);
$hasil=mysql_query("select * from admin where nuser='$user' and passwd='$pass'");
$hasil=mysql_fetch_array($hasil);
if ($hasil['nuser']!=NULL)
{
if($hasil['jenis']=="admin")
{
$_SESSION["user"]=$user;
$_SESSION["admin"]="admin";
}else
{
$_SESSION["user"]=$user;
$_SESSION["admin"]="kepala";
}
}
}
if(@$_GET['logout']=='l'){
unset($_SESSION["user"]);
unset($_SESSION["admin"]);
session_destroy();
}
header("Location: ".$_SERVER['HTTP_REFERER']);
?>
Revise this Paste
Parent: 33811