Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2003-11-30 07:07
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>';

?>