PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of James Glenlake   SmashUser   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of how to use SmashUser
Class: SmashUser
Database based user management with group support
Author: By
Last change:
Date: 20 years ago
Size: 379 bytes
 

Contents

Class file image Download
<?php

session_start
();
$config = parse_ini_file('config.ini.php', true);
require
'user.php';

$joe = new user('joe', 'test', 'admins');
$joe->check();
if (
$joe->login())
print
'Logged in successfully with username '.$HTTP_SESSION_VARS['username'].'.<br>';
$joe->logout();
print
'Logged out successfully. Current user is '.$HTTP_SESSION_VARS['username'].'.<br>';

?>