Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include "koneksi.php";
- $user = $_POST['username'];
- $pass = $_POST['password'];
- $login = $_POST['login'];
- if ($login) {
- if ($user == "" && $pass == "") {
- echo "<script type='text/javascript'>alert('Username & Password Empty')</script";
- }
- else {
- $sql = mysqli_query("select * from login where username = '$user' and password = md5('$pass') ") or die(mysql_error());
- $data = mysqli_fetch_array($sql);
- $cek = mysqli_num_rows($sql);
- if ($cek >= 1) {
- echo "Login Berhasil";
- }
- else{
- echo "Login Gagal";
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement