Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'koneksi.php';
- $username = $_POST['username'];
- $password = $_POST['password'];
- $cek = mysqli_query($connect, "select * from login where username='$username' and password='$password'");
- $result = mysqli_num_rows($cek);
- if($result>0){
- $user = mysqli_fetch_array($cek);
- session_start();
- $_SESSION['username'] = $user['username'];
- header("location:welcome.php");
- }else{
- header("location:index.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement