Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("connect.php");
- ob_start();
- $username=$_GET['username'];
- $password=$_GET['password'];
- $query=mysql_query("select * from tuser where username='$username' and password='$password'");
- $row_user=mysql_fetch_assoc($query);
- if (($username!="")&&($password!=""))
- {
- if (($username==$row_user['username'])&&($password==$row_user['password']))
- {
- session_start();
- session_register('username');
- session_register('password');
- header("location:admin/index.php");
- }
- else
- {
- echo "<script>alert('password salah');location.href='index.php'</script>";
- }
- }
- else
- {
- echo"<script>alert('kosong coy');location.href='index.php'</script>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement