ccc

 avatar
unknown
php
a year ago
665 B
5
Indexable
<?php
    
    // mengaktifkan session php
    session_start();

    //hubungkan koneksi
    include 'FormLoginJibril.php';

    // menangkap data yang dikirim dari form
    $username = $_POST['username'];
    $password = $_POST['password'];
    
    // menesuaikan data admin dengan yang dibutuhkan
    $data = mysqli_query($koneksi,"select * from admin where username='$username' and password='$password'");
   $cek = mysqli_num_rows($data);
   if ($cek > 0){
    $_SESSION['username'] = $username;
    $_SESSION['status'] = "login";
    header("location:admin/index1.php");
   }else{
    header("location:index.php?pesan=gagal");
   }
   ?>
Editor is loading...
Leave a Comment