<?php
session_start();
if (!empty($_SESSION['email'])) {
header('location:index.php?hal=ubahdata');
}
?>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
</head>
<center>
<body>
<h1>Login</h1>
<?php
//kode php ini kita gunakan untuk menampilkan pesan eror
if (!empty($_GET['error'])) {
if ($_GET['error'] == 1) {
echo '<h3>Username dan Password belum diisi!</h3>';
} else if ($_GET['error'] == 2) {
echo '<h3>Username belum diisi!</h3>';
} else if ($_GET['error'] == 3) {
echo '<h3>Password belum diisi!</h3>';
} else if ($_GET['error'] == 4) {
echo '<h3>Username dan Password tidak terdaftar!</h3>';
}
}
?>
<form action="index.php?hal=otentikasi" name="login" method="post">
<div class="form-group">
<label for="email">Email:</label>
<input type="email" class="form-control" id="email" name="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="password" name="password">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</body>
</center>
</html>