form_login.php
<html>
<head>
<title>Form Login</title>
</head>
<body>
<!–Memulai Form HTML–>
<form action="proses.php" method="post">
<pre>
Login Anggota
User : <input type="text" name="user">
Pass : <input type="password" name="pass">
<input type="submit" name="masuk" value="Login"
>
</pre>
</form>
</body>
</html>
proses.php
<html>
<head>
<title>Proses Login</title>
</head>
<body>
<?php
if($_POST) {
if(isset($_POST[user]) and isset($_POST[pass])) {
if($_POST[user] == "Amri" and $_POST[pass] == "alunagutawa") {
echo "Selamat datang Amri Multimedia";
}
else {
echo "Maaf, User atau Password anda salah !";
}
}
else {
echo "Mohon dilengkapi !";
}
}
?>
</body>
</html>
Tidak ada komentar :
Posting Komentar