Hello,
I ran into a snag with a very simple form i created for only a a single purpose. When the admin of the site logs in, the pages wll display the total number of users viewing the site, no more no less (for now). The problem is that when he/she logs in I don't want to show the form anymore.
The form works and does what it should do, I just can't get it to stop displaying. Maybe I'm just overthinking this, but im stumped...
Thanks for any ideas.
<?php
if (!isset($_POST['go'])) { ?>
<form action=index.php method="post"><br />
Username: <input name="uname" type="text" size="10" maxlength="10" /><br /><br />
Password: <input name="pass" type="password" size="10" maxlength="10" /><br />
<input name="go" type="submit" value="Login" />
</form>
<?php } elseif (isset($_POST['go'])) { ?>
<form action=index.php method="post"><br />
<?php if ( ($_POST['uname'] !== $uname) ) {
echo "Username Incorrect <br />";
} //endif
?>
Username: <input name="uname" type="text" size="10" maxlength="10" value="<?php $_POST['uname'] ?>" /><br /><br />
<?php if ( ($_POST['pass'] !== $pass) ) {
echo "Password Incorrect <br />";
} //endif
?>
Password:
<input name="pass" type="password" size="10" maxlength="10" value="<?php $_POST['pass'] ?>" /><br />
<input name="go" type="submit" value="Login" />
</form>
<?php } ?>