You are on page 1of 2

FORM INPUT

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body>
<form action="Proses05.php" method="post" name="input">
<h2>&nbsp;</h2>
<h2>&nbsp;</h2>
<h2>&nbsp;</h2>
<table width="394" height="91" border="1" align="center" bordercolor="#000000">
<tr>
<td><div align="center"><h2>Silahkan Login Disini</h2>
<p>Username :
<input type="text" name="username">
<br>
Password :
<input type="password" name="password">
<br>
<br>
<input type="submit" name="Login" value="Login">
<input type="reset" name="reset" value="Reset">
</p>
</td>
</tr>
</table>
</form>
</body>
</html>
PROSES LOGIN

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Input</title>
</head>
<body>
<?php
if (isset($_POST['Login'])) {
$user = $_POST['username'];
$pass = $_POST['password'];
if ($user == "darwan" && $pass == "123") {
echo "<h1>Login Berhasil</marquee></h1>";
} else {
echo "<h1>Login Gagal</h1>";
echo "<h2>Username & Password yang Anda masukan salah...</h2>";
}
}
?>
</body>
</html>

You might also like