Tutorial Membuat Form Login di PHP
Wednesday, December 4, 2019
1 Comment
Source kode HTML
form_login.html
<!DOCTYPE html>
<html>
<head>
<title>Form Login</title>
</head>
<body>
<H1>Login Dulu...</H1>
<form action="proses.php" method="POST" name="input">
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">
</form>
</body>
</html>
Source Kode PHP
proses.php
<?php
if(isset($_POST['login'])){
$user = $_POST['username'];
$pass = $_POST['password'];
if($user == "ani" && $pass == "ani123"){
echo "Login Berhasil";
}else{
echo "Login Gagal";
}
}
?>
Siipp
ReplyDelete