Advertisement
Guest User

Untitled

a guest
Jan 14th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2. session_start();
  3. require_once ('connections/koneksi.php');
  4. $user = $_POST['userid'];
  5. $pass = $_POST['password'];
  6. $cekuser = mysql_query("SELECT * FROM anggota WHERE userid = '$user'");
  7. $hasil = mysql_fetch_array($cekuser);
  8. error_reporting(0);
  9. if (mysql_num_rows($cekuser) == 0) {
  10. echo 'User ID Belum Terdaftar!<br/>';
  11. echo '<a href="login.php">&laquo; Back</a>';
  12. } else {
  13. if ( $pass <> $hasil['password'] ) {
  14. echo 'Password Salah!<br/>';
  15. echo '<a href="login.php">&laquo; Back</a>';
  16. } else {
  17. $_SESSION['userid'] = $user;
  18. header('location:index.php');
  19. }
  20. }
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement