Login Form
SOURCE CODE:
<html><head><title>PHP Version - $_POST</title></head>
<body bgcolor = "#FFFF99" text = "#800000">
<?
// With PHP, we'll get an error if nothing is posted to form without this code in RED
if ((isset($_POST['txtName'])) && (isset($_POST['txtPass']))) {
$txtName=$_POST['txtName'];
$txtPass=$_POST['txtPass'];
} else {
$txtName="";
$txtPass="";
}
?>
<? if (($txtName != "admin") || ($txtPass != "pass")) { ?>
<h1 align=center>Login Form</h1>
<form method='post' action='282ln07builtinObjects.php'>
<input type='text' name='txtName' size='20'> Name<br><br>
<input type='password' name='txtPass' size='20'> Password<br><br>
<input type='submit' value='Login' name='btnSubmit'>
<input type='reset' value='Clear' name='btnClear'>
</form>
<? } else { ?>
<h3 align='center'>Welcome Back!</h3>
<? } ?>