Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function authenticate($username, $password)
- {
- $SETusername="todd";
- $SETpassword="1234";
- if ($username==$SETusername && $password==$SETpassword) {
- return true;
- } else {
- return false;
- }
- //write code that checks the arguments to make sure they match and returns true or false
- //if we're going to return true, store the username in the user's session
- }//end authenticate
- function getUsername()
- {
- }
- function loggedIn()
- {
- if (isset ($_SESSION['name'])) {
- echo ('<a href="logout.php">Logout</a><br />');
- } else {
- echo ('<a href="login.php">Login</a>');
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement