It looks like you're new here. If you want to get involved, click one of these buttons!
<?php
include "koneksi.inc.php";
$con=mysqli_connect("localhost","root","","showdatamysql");
$nama = mysqli_real_escape_string($con,$_POST['nama']);
$password = mysqli_real_escape_string($con,$_POST['password']);
$perintah="SELECT * FROM anggota WHERE nama='$nama' AND password='$password'";
$hasil=mysqli_query($con,$perintah);
$active=mysqli_fetch_array($hasil,MYSQLI_NUM);
$row = $active['row'];
if ($row[1] == $nama AND $row[2] == $password)
{
session_start();
session_register("terrybig");
session_register("varchase");
$_session["terrybig"] = $nama;
$_session["varchase"] = $password;
if ($row[3] == 2)
{header("location: index.php");}
}
else
{
{header("location:accessdenied.php");}
}
?>
Comments