Hi
I just found this code and I want to know if it is good, or if it has some troubles...
Thanks
I just found this code and I want to know if it is good, or if it has some troubles...
| Code: |
|
<?php // Designate your username and password $username = "user"; $password = "pass"; if ($_POST['user'] != $username || $_POST['pass'] != $password) { ?> <h1>Login</h1> <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <p><label for="user">Username:</label> <input type="text" title="Please enter your Username" name="user"></p> <p><label for="pass">Password:</label> <input type="password" title="Please enter your Password" name="pass"></p> <p><input type="submit" name="Submit" value="Login"></p> </form> <?php } else { ?> <!-- Place the Password Protected content here --> <p>Content.</p> <?php } ?> |
Thanks
