PHP Classes
elePHPant
Icontem

File: examples/example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Giulio Bai  >  User Manager  >  examples/example1.php  >  Download  
File: examples/example1.php
Role: Example script
Content type: text/plain
Description: Example #1
Class: User Manager
Manage and authenticate registered users
Author: By
Last change: fixed
Date: 5 years ago
Size: 621 bytes
 

Contents

Class file image Download
<?php

include_once('../usermanager.php');

$UM = new UserManager();

// The URL of the page should be something like
// http://example.org/switcher.php?action=LOGIN|REGISTER|FORGOT|INFO
switch ($_GET['action'])
{
    case
LOGIN:
       
$UM->display_login();
        break;
    case
REGISTER:
       
$UM->display_register();
        break;
    case
FORGOT:
       
$UM->display_forgot();
        break;
    case
INFO:
       
$UM->display_user();
        break;
    default:
       
// Redirects to the home page set in the class
       
header("Location: $this->HOMEPAGE");
        break;
}