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 Mohammed Cherkaoui  >  User-Checker  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Usage example
Class: User-Checker
Authenticate user with records in a MySQL database
Author: By
Last change: fixed !
Date: 3 years ago
Size: 544 bytes
 

Contents

Class file image Download
<?php



require('userinfo.class.php');




$User = new userChecker('users'
                                array(
'Username' => 'username''Password' => 'password'// table Columns
                                

                                array(
'Username' => 'username''Password' => 'password'// cookies Names
                        
); 



if(
$User->userinfo('usergroup') == 0

    echo 
'Hey , You Are Just A Visitor !'
} else 
// so userinfo('usergroup') > 0 or = 1 

    echo 
'You Are A member !'


echo 
'<br />'

echo 
'your Name: '.$User->userinfo('username');   



?>