Login   Register  
PHP Classes
elePHPant
Icontem

File: home.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kevin Cadman  >  Authentication  >  home.php  >  Download  
File: home.php
Role: Example script
Content type: text/plain
Description: Example "home" page
Class: Authentication
A session and cookie based authentication class
Author: By
Last change:
Date: 11 years ago
Size: 424 bytes
 

Contents

Class file image Download
<?PHP
/*
A "test" home page. 

Note how auth.php is included. This gets the authentication started.
*/
include 'auth.php';
echo 
"hi!";
echo 
'<a href="'.$_SERVER['PHP_SELF'].'?logout">logout</a>';
if(isset(
$_GET['logout'])) {

/*
Used for logging out. 
Note, we may call AuthKill() without the class being instantiated, as it's just killing sessions.
*/
    
Authentication::AuthKill();
    echo 
"logged out";
}
?>