Member Login
SOURCE CODE:
<html>
<head><title>Form Collection</title></head>
<body>
<h1> Member Login</h1>
<?
// With PHP, we'll get an error if nothing is posted to form without this code in BLUE
if ((isset($_POST['txtMember'])) && (isset($_POST['txtPassword']))) {
$txtName=$_POST['txtMember'];
$txtPass=$_POST['txtPassword'];
} else {
$txtMember="";
$txtPassword="";
}
?>
<? if (($txtMember != "Hunter") || ($txtPassword != "qwerty")) { ?>
<form method="post" name="frmC" action="282ln08post.php">
<input type="text" name="txtMember" size="20">Member Name
<br><Br>
<input type="password" name="txtPassword" size="20">Password
<br><Br>
<input type="submit" value="Login" name="btnSubmit">
</form>
<? } else { ?>
<? $txtMember = $_POST['txtMember'];
$txtPass = $_POST['txtPassword'];
?>
<h3>Welcome Back <? echo $txtMember; ?>
!</h3>
<br>
<? } ?>