toobi

login.php

Oct 5th, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php
  2.  
  3.     require_once "core/init.php";
  4.  
  5.     //validasi login
  6.     if (isset($_POST['submit'])) {
  7.         $nama = $_POST['username'];
  8.         $pass = $_POST['password'];
  9.  
  10.         if (!empty(trim($nama)) && !empty(trim($pass)) ){
  11.            
  12.             cek_data($nama,$pass);
  13.  
  14.         }else{
  15.             echo "Jangan Kosong";
  16.         }
  17.     }
  18.  
  19.     require_once "view/header.php";
  20.  
  21.  ?>
  22.  
  23.     <form action="login.php" method="post">
  24.         <label for="">Nama</label><br>
  25.         <input type="text" name="username"><br><br>
  26.  
  27.         <label for="">Password</label><br>
  28.         <input type="password" name="password"><br><br>
  29.  
  30.         <input type="submit" name="submit" value="login">
  31.     </form>
  32.  
  33.  <?php
  34.  
  35.     require_once "view/footer.php";
  36.  
  37.   ?>
Add Comment
Please, Sign In to add comment