Created
November 19, 2015 11:04
-
-
Save Teino1978-Corp/eba223b0e5669dd3595e to your computer and use it in GitHub Desktop.
E-banking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Login User</title> | |
</head> | |
<body> | |
<h1>Dream Bank</h1> | |
<form method="post" action="beranda.php"> | |
<p><label>Username :</label> | |
<input type="text" name="user" autofocus></p> | |
<p><label>Password. :</label> | |
<input type="password" name="pass"></p> | |
<p> | |
<button type="submit" >Sign In</button> | |
</p> | |
</form> | |
</body> | |
</html> | |
<?php | |
$file = fopen("nasabah.csv", "r"); | |
$username = ($_POST['user']); | |
$password = ($_POST['pass']); | |
$success = false; | |
while (!feof($file) !== false) { | |
if ($data[0] == $username && $data[1] == $password) { | |
$success = true; | |
break; | |
} | |
} | |
session_start(); | |
fclose($data) | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? php | |
session_start(); | |
if (isset($_SESSION['sukses'] )) | |
echo " balance anda : 0 "; | |
else | |
echo "you have not logged"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment