<?php
//cek tombol login sudah di pencet belom kalau sudah
if (isset($_POST["login"] )) {
//kita cek username dan password benar atau salah
if ($_POST["Username"] == "admin" && $_POST["Password"] == "admin"){
// jika benar kita redirect ke halaman admin
header("Location: admin.php");
exit;
}
else{
// jika slah kembali ke halaman login dan di beri pesan kesalahan
$eror = true;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login V12</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="images/icons/favicon.ico"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
</head>
<body>
<div class="limiter">
<div class="container-login100" style="background-image: url('images/bg1.png');">
<div class="wrap-login100 p-t-190 p-b-30">
<form class="login100-form validate-form" method="post">
<div class="login100-form-avatar">
<img src="images/profile.jpeg" alt="foto">
</div>
<span class="login100-form-title p-t-20 p-b-45">
Alif Kusuma
</span>
<div class="wrap-input100 validate-input m-b-10" data-validate = "Username is required">
<input class="input100" type="text" name="Username" placeholder="Username">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-user"></i>
</span>
</div>
<div class="wrap-input100 validate-input m-b-10" data-validate = "Password is required">
<input class="input100" type="Password" name="pass" placeholder="Password">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-lock"></i>
</span>
</div>
<div class="container-login100-form-btn p-t-10">
<button class="login100-form-btn">
<a href="table.html">Login</a>
</button>
</div>
<div class="text-center w-full p-t-25 p-b-230">
<a href="#" class="txt1">
Lupa Username / Password?
</a>
</div>
<div class="text-center w-full">
<a class="txt1" href="#">
Buat account baru
<i class="fa fa-long-arrow-right"></i>
</a>
</div>
</form>
</div>
</div>
</div>
<!--================================================================================
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<!--================================================================================
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!--================================================================================
<script src="vendor/select2/select2.min.js"></script>
<!--================================================================================
<script src="js/main.js"></script>
</body>
</html>
Maka hasil nya akan seperti ini,,jangan lupa untuk background foto bisa kamu ganti ya
lalu kita buat agar saat di klik login nanti akan tampil ke halaman selanjut nya,disini saya menggunakan
table
berikut codingan table nya
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Table siswa</title>
<link rel="stylesheet" href="lib/css/bootstrap.css">
</head>
<body>
<div class="container">
<center>
<h3>SISWA SMK KARTIKA JURUSAN TKJ</h3>
<h4>Table Siswa</a></h4>
</center>
<left>
<a href="index.php">LOGOUT</a>
</left>
<br /><br />
<table class="table">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Kelas</th>
<th>Jurusan</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Alif Kusuma</td>
<td>XI</td>
<td>TKJ</td>
</tr>
<tr>
<td>2</td>
<td>Casraya</td>
<td>XI</td>
<td>TKJ</td>
</tr>
<tr>
<td>3</td>
<td>Chindy</td>
<td>XI</td>
<td>TKJ</td>
</tr>
<tr>
<td>4</td>
<td>Fajar agung</td>
<td>XI</td>
<td>TKJ</td>
</tr>
</tbody>
</table>
</div>
<script src="lib/jquery/jquery.js"></script>
<script src="lib/js/bootstrap.min.js"></script>
<script src="lib/js/bootstrap.js"></script>
</body>
</html>
lalu hasil nya akan seperti ini
TERIMA KASIH
SELAMAT MENCOBA........
Nilai : 100
BalasHapus