Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Script by Denny Irawan
- session_start();
- require_once("koneksi.php");
- $username = $_POST['username'];
- $pass = $_POST['password'];
- $cekuser = mysql_query("SELECT * FROM user WHERE username = '$username'");
- $jumlah = mysql_num_rows($cekuser);
- $hasil = mysql_fetch_array($cekuser);
- if($jumlah == 0) {
- header("location:index.html?Username:belum-terdaftar.");
- } else {
- if($pass <> $hasil['password']) {
- header("location:index.html?Password=Salah");
- } else {
- $_SESSION['username'] = $hasil['username'];
- header('location:/home');
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement