PDA

View Full Version : PHP User Management System using Object Oriented Programming and MySQL



Specific
01-06-2011, 01:46 AM
Introduction
Creating a website where users are allowed to register, sign in and access certain services can be a pain in the ass to manage. In this tutorial I will be covering the basics of a PHP login system, and how Object Oriented Programming can help manage the users. I assume that you have fundamental knowledge of PHP and MySQL.

It's always a good idea to plan what you want to store in your database, and how you are going to implement it into your programming. In this case, I wanted the user management system to scale to whatever options I add to the users table.

Step 1: Creating the users table.
Using phpmyadmin or whatever method you choose, create the following table:
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL,
`password` varchar(32) NOT NULL,
`email` varchar(64) NOT NULL,
`is_admin` int(1) NOT NULL default '0',
`session` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAMStep 2: Creating a database class
I created this database class to provide the basic functionality of MySQL, but also allow it to be extended in the future. There are four variables that will need to be modified to work with your mysql database.
<?php
// Database.php
class Database {

private $connection;

/**
* ================================================== ===========
* Change these values to work with your mysql database settings
* ================================================== ===========
*/
private $db_host = 'localhost';
private $db_user = 'username';
private $db_pass = 'password';
private $db_name = 'databasename';

private $where = array();
private $variables = array();
private $link;
private $functions = array(
'affected_rows' => 'mysql_affected_rows',
'client_encoding' => 'mysql_client_encoding',
'close' => 'mysql_close',
'connect' => 'mysql_connect',
'create_db' => 'mysql_create_db',
'data_seek' => 'mysql_data_seek',
'db_name' => 'mysql_db_name',
'db_query' => 'mysql_db_query',
'drop_db' => 'mysql_drop_db',
'errno' => 'mysql_errno',
'error' => 'mysql_error',
'escape_string' => 'mysql_escape_string',
'fetch_array' => 'mysql_fetch_array',
'fetch_assoc' => 'mysql_fetch_assoc',
'fetch_field' => 'mysql_fetch_field',
'fetch_lengths' => 'mysql_fetch_lengths',
'fetch_object' => 'mysql_fetch_object',
'fetch_row' => 'mysql_fetch_row',
'field_flags' => 'mysql_field_flags',
'field_len' => 'mysql_field_len',
'field_name' => 'mysql_field_name',
'field_seek' => 'mysql_field_seek',
'field_table' => 'mysql_field_table',
'field_type' => 'mysql_field_type',
'free_result' => 'mysql_free_result',
'get_client_info' => 'mysql_get_client_info',
'get_host_info' => 'mysql_get_host_info',
'get_proto_info' => 'mysql_get_proto_info',
'get_server_info' => 'mysql_get_server_info',
'info' => 'mysql_info',
'insert_id' => 'mysql_insert_id',
'list_dbs' => 'mysql_list_dbs',
'list_fields' => 'mysql_list_fields',
'list_processes' => 'mysql_list_processes',
'list_tables' => 'mysql_list_tables',
'num_fields' => 'mysql_num_fields',
'num_rows' => 'mysql_num_rows',
'pconnect' => 'mysql_pconnect',
'ping' => 'mysql_ping',
'query' => 'mysql_query',
'real_escape_string' => 'mysql_real_escape_string',
'result' => 'mysql_result',
'select_db' => 'mysql_select_db',
'set_charset' => 'mysql_set_charset',
'stat' => 'mysql_stat',
'tablename' => 'mysql_tablename',
'thread_id' => 'mysql_thread_id',
'unbuffered_query' => 'mysql_unbuffered_query'
);

function __construct() {

$this->link = $this->connect($this->db_host, $this->db_user, $this->db_pass);
if(!$this->link)
{
die('Could not connect: ' . mysql_error());
}

$this->select_db($this->db_name);
}

function __destruct() {
if($this->link)
{
mysql_close($this->link);
}
}

public function __call($name, $arguments) {
if(isset($this->functions[$name]))
{
return call_user_func_array($this->functions[$name], $arguments);
}
return FALSE;
}



}Step 3: Creating a user class
The user class isn't much, it provides easy access to the user's data, and handles simple functionality such as checking the user's password. I mentioned earlier that I wanted the class to scale with our database table, so I don't hard code any variables in the class.
<?php

class User {

private $userdata = array();

public function User() {

}

public function checkPassword($pass) {
if(isset($this->userdata['password']) && $this->userdata['password'] == md5($pass))
{
return true;
}
return false;
}

public function set($var, $value) { $this->userdata[$var] = $value; }

public function get($var) {
if(isset($this->userdata[$var]))
{
return $this->userdata[$var];
}
return NULL;
}
}The methods get, and set will be used to store information about the user.

Specific
01-06-2011, 01:47 AM
Step 4: Creating the User Manager Class
The user manager class is the heart of the system. It manages user creation, user deletion, user updates, login/logout, and sessions.

At the top of the user manager class we will include the User and Database files.
<?php

require_once "User.php";
require_once "Database.php";

class UserManager {When we make a call to create the user manager class, it will create an instance of the database class and store it into a private variable.
private $db;

public function UserManager() {
$this->db = new Database();
} The $db variable is private because we'll never call it outside of this class or it's subclasses.

The first methods I created were: create, update and delete.
public function createUser($username, $password, $email, $is_admin = FALSE) {

$stmt = sprintf("INSERT INTO users (`id`, `username`, `password`, `email`, `is_admin`) VALUES (NULL, '%s', '%s', '%s', '%d')",
$this->db->real_escape_string($username),
md5($this->db->real_escape_string($password)), // A md5 hash of the user's password will be stored in the database.
$this->db->real_escape_string($email), // always escape data from public before storing in database
$this->db->real_escape_string($is_admin));
$result = $this->db->query($stmt);

if($result) return true;
return false;
}
public function updateUser($user)
{
// Normally I wouldn't store session data in the database, but
// it can be changed to track cookies if you plan to go that
// route.
$session = $user->get('session');
if(!$session) $session = 0;
$stmt = sprintf("UPDATE users SET `username` = '%s', `password` = '%s', `email` = '%s', `is_admin` = '%d', `session` = '%s' WHERE `id` = '%d'",
$this->db->real_escape_string($user->get('username')),
$this->db->real_escape_string($user->get('password')),
$this->db->real_escape_string($user->get('email')),
$this->db->real_escape_string($user->get('is_admin')),
$this->db->real_escape_string($session),
$this->db->real_escape_string($user->get('id')));
return $this->db->query($stmt);

}
public function deleteUser($user)
{
$userID = $this->db->real_escape_string($user->get('id'));
return $this->db->query("DELETE FROM users WHERE `id` = '$userID'");
} Notice the user class in action... it will scale to the database by using the table's keys. You could add a field called "is_moderator" and use set('is_moderator', $value) or get('is_moderator').

Getting users from the database and returning a user object.
public function getUserByID($id) {
// get the user by id from database
$stmt = sprintf("SELECT * FROM users WHERE id = '%s'", $this->db->real_escape_string($id));
$result = $this->db->query($stmt);
if($result)
{
$user = new User(); // create a new user object
$row = $this->db->fetch_assoc($result);
foreach($row as $key => $value) // loop through user table values
{
$user->set($key, $value); // store them in the user object
}
return $user; // and return it
}
return NULL;
}

public function getUserByName($name) {

$stmt = sprintf("SELECT * FROM users WHERE username = '%s'", $this->db->real_escape_string($name));
$result = $this->db->query($stmt);
if($result && $this->db->num_rows($result) > 0)
{
$user = new User();
$row = $this->db->fetch_assoc($result);
foreach($row as $key => $value)
{
$user->set($key, $value);
}
return $user;
}

return NULL;
}The login method of the user manager class will get user by name, check the password, updates session info in the database, and return the user object.
public function login($username, $password)
{
$user = $this->getUserByName($username);
if(isset($user) && $user->checkPassword($password))
{
session_start();
$_SESSION['zhuser'] = $user->get('username'); // I normally use these for cookies
$_SESSION['zhsess'] = md5($username.microtime()); // "
$user->set('session', $_SESSION['zhsess']); // set the session in user object
$this->updateUser($user); // update the user
return $user; // and return the user object if we're good
}
return NULL;
}
public function logout() {
session_start();
unset($_SESSION);
session_destroy();
}How do we know when the user is logged in and who they are? We'll use the sessions we created to track this information. The getSession method checks if a session exists and against what we have stored in the database, if they match we're good.
public function getSession() {
session_start();
if(isset($_SESSION['zhuser']) && isset($_SESSION['zhsess']))
{
$user = $this->getUserByName($_SESSION['zhuser']);
if(!$user) $this->logout();
if($user->get('session') == $_SESSION['zhsess'])
{
return $user;
}
}
return NULL;
}Step 5: Putting it to work

// include the usermanager class
require_once 'libs/UserManager.php';
$um = new UserManager();
// Logging in
$user = $um->login($_POST['username'], $_POST['password']);
if(!user)
{
exit('login failed'); // if no user, the login had failed.
}

// we're logged in from here out; redirect to secret page!
header('location: secret.php');More examples are in the attached source.

bizboy12
04-24-2011, 06:21 PM
Awesome!
Thank you for sharing the nice tutorial! It is very useful for me.

Specific
05-22-2011, 02:31 PM
You're welcome.

0day
06-22-2011, 02:22 PM
This is really awesome. Literally saved me hours.

Are you guys the used to make the hacks for MSN Gaming Zone way back when?

Epic.

Specific
06-22-2011, 06:07 PM
This is really awesome. Literally saved me hours.

Are you guys the used to make the hacks for MSN Gaming Zone way back when?

Epic.
Happy to hear the classes saved you time. That's what it's there for.

Yes, we did make hacks for MSN Gaming Zone back in the day. =)

rev.roger007
07-13-2011, 05:23 AM
Thanks alot.... Its very usefull 4 me...

non
07-15-2011, 08:32 PM
:D:cool::D:p

MrTree
07-23-2011, 05:16 PM
Thanks so much for this :D really useful and saves a lot of time, and you can also learn alot from this.

MrTree
07-24-2011, 08:17 AM
Sorry for double post, but I see one problem with this, once you are logged in it displayes the username and session at the top of the page, it like echoes it out? And I cant seem to find a way to hide it.

Specific
07-24-2011, 11:35 AM
Re-download the attachment.

Sorry for double post, but I see one problem with this, once you are logged in it displayes the username and session at the top of the page, it like echoes it out? And I cant seem to find a way to hide it.

eragonies
08-02-2011, 12:17 AM
thanks.its very helpful..

grvrulz
08-19-2011, 11:48 PM
thank you for the great tutorial, but i'm not able to download the attachment even after logging in. I get this error


grvrulz, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Specific
08-20-2011, 12:00 AM
Thanks. You have to be an active, contributing member on the forum with at least 7 posts to download attachments.
thank you for the great tutorial, but i'm not able to download the attachment even after logging in. I get this error

grvrulz
08-21-2011, 12:43 AM
oh thanks. I'll post something (useful). :)

Thanks. You have to be an active, contributing member on the forum with at least 7 posts to download attachments.

amaar
11-03-2011, 05:59 AM
thanks it really helped me

superbriand
11-13-2011, 03:11 PM
Very helpful. Thank you!

ediefarah
11-19-2011, 06:28 AM
thank youuuuuuuuu

rajait
11-23-2011, 12:35 AM
thanks for the post

mungurini
01-05-2012, 06:54 AM
good script .Thanks guy

Iain
01-11-2012, 03:05 AM
Stumbled across this post by looking for how to use OOP PHP to make a user system. Absolutely spot on, will really help me learn. Thanks :)

generalsagar
01-14-2012, 09:26 AM
Dear admin, i registed to ur site today and i'm not able to download the attachment. I'm getting this ridiculous message :

"generalsagar, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation."

Specific
01-15-2012, 11:48 PM
Dear admin, i registed to ur site today and i'm not able to download the attachment. I'm getting this ridiculous message :

"generalsagar, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation."
We require that you be an active and contributing member of the community before you can download attachments.

karel.maenhout
01-20-2012, 02:18 AM
Nice tutorial, I registered especially for being able to download the file.

bakermanus
01-21-2012, 08:00 AM
I have the same message. How can i download it then?
Thanks

Specific
01-21-2012, 07:23 PM
We require that people have a minimum amount of posts / contribution on the forum. A good start would be to introduce yourself and tell us your interests. You're obviously here because you share similar interests.

generalsagar
01-22-2012, 06:35 AM
Hi i'm still learning PHP. I couldnt understand what is $name & $arguments in step 2. Can u please explain?

Specific
01-22-2012, 12:00 PM
public function __call($name, $arguments) {
if(isset($this->functions[$name]))
{
return call_user_func_array($this->functions[$name], $arguments);
}
return FALSE;
}
I think you're talking about the function I quoted above. In object oriented programming you can overload functions that are defined by parent classes. When you make a call to a function that doesn't exist in your class, the class passes the function name and arguments to the __call function, and you can decide what to do with these unknown function calls. The above example is part of a database class that will call mysql functions if it can't find it defined in our class. Hopefully that explains it.

generalsagar
01-23-2012, 09:46 AM
Thanks. And in step 3, please explain public function set($var, $value) & public function get($var)

Specific
01-23-2012, 05:28 PM
Thanks. And in step 3, please explain public function set($var, $value) & public function get($var)
The Set method in the User class simply populates an array with data from the UserManager class. You can access the data stored in the array using the Get method. The code below is where it populates the user data in UserManager class.


public function getUserByName($name) {

$stmt = sprintf("SELECT * FROM users WHERE username = '%s'", $this->db->real_escape_string($name));
$result = $this->db->query($stmt);
if($result && $this->db->num_rows($result) > 0)
{
$user = new User();
$row = $this->db->fetch_assoc($result);
foreach($row as $key => $value)
{
$user->set($key, $value);
}
return $user;
}

return NULL;
}

To create a user object you can do the following:


$um = new UserManager();
$user = $um->getUserByName($username);
$id = $user->get('id');
$isAdmin = $user->get('isAdmin');
//... etc
The whole point is to make it simple to access columns in the user table.

murazaki
02-07-2012, 10:32 AM
Thanks for this helpful tutorial ;) !

omi_omi
02-21-2012, 04:00 AM
great tutorial

orljustin
02-24-2012, 07:47 AM
I had an old user class I wrote a while back. Trying to freshen it up with your suggs here. Thanks.

rajait
03-17-2012, 01:02 AM
thanks for this tutorials

Csgutt
04-11-2012, 12:24 AM
thank you :)

GT3XX
04-20-2012, 11:44 AM
Thanks for the great tutorial

bejace
05-26-2012, 08:36 AM
great script

qbasob
05-27-2012, 02:37 PM
Thanks, that's what i'm looking for ;)

raghucse2010
06-12-2012, 01:32 PM
Can any one send me this to my mail id (raghucse2010@aol.com) bcz when i am trying to download it says "you do not have permission to access this page."

Cayda
07-08-2012, 07:35 PM
Wow, a great tutorial!

Cayda
07-08-2012, 07:36 PM
Wow! A great tutorial!

wkristian
07-09-2012, 01:01 AM
great tutorial

designation
07-19-2012, 05:43 AM
I was strucked of from OOP but thanks to you to make me back in this again :D

This was helpful but really I am working from last some months with PHP but not getting what I want.

Everybody says that PHP is easiest programming but not seems like this for me. :P

I will be thankful to you if you can tell me some tricks to learn PHP a little quickly than usual.

designation
07-19-2012, 07:34 AM
Thanks for this understandable and nice tutorial ;)

suyashjain
08-22-2012, 10:41 PM
this tutorial is quiet helpful.

longestdrive
09-10-2012, 04:30 AM
Great tutorial - can't wait to download the attachment and see how I use the class in a website

motionworx
09-24-2012, 08:39 PM
Excellent Tutorial. Really helpful information and thank you to the author for posting it here.

Bigger E
09-25-2012, 01:22 AM
I'm looking forward to download the attachment.

crazysox
09-29-2012, 07:11 AM
Great tutorial.

bsanta30
10-16-2012, 05:22 AM
Looks like a great tutorial, but with my limited abilities in php & mysql, makes it a little difficult using & understanding classes. But I will certainly be back once I get a better understanding of what's really going on in this code. Thank you for taking the time to create this tutorial.

sergiopedrola
10-24-2012, 10:39 AM
thank you, good post

svartberg89
10-27-2012, 03:31 PM
nice work dude

svartberg89
10-27-2012, 03:41 PM
Thank you very much

advsid1821
12-22-2012, 09:10 AM
This is a very nice tutorial.

Pezmc
12-22-2012, 10:31 AM
This is awesome, thank you!

thiagomdo
12-28-2012, 11:23 AM
Thank you!

oz0n3
01-02-2013, 06:20 AM
Nice tutorial but I can't d/l the supporting files, what gives?!

dreemebird
01-03-2013, 12:58 AM
very good one.

Introduction
Creating a website where users are allowed to register, sign in and access certain services can be a pain in the ass to manage. In this tutorial I will be covering the basics of a PHP login system, and how Object Oriented Programming can help manage the users. I assume that you have fundamental knowledge of PHP and MySQL.

It's always a good idea to plan what you want to store in your database, and how you are going to implement it into your programming. In this case, I wanted the user management system to scale to whatever options I add to the users table.

Step 1: Creating the users table.
Using phpmyadmin or whatever method you choose, create the following table:
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL,
`password` varchar(32) NOT NULL,
`email` varchar(64) NOT NULL,
`is_admin` int(1) NOT NULL default '0',
`session` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAMStep 2: Creating a database class
I created this database class to provide the basic functionality of MySQL, but also allow it to be extended in the future. There are four variables that will need to be modified to work with your mysql database.
<?php
// Database.php
class Database {

private $connection;

/**
* ================================================== ===========
* Change these values to work with your mysql database settings
* ================================================== ===========
*/
private $db_host = 'localhost';
private $db_user = 'username';
private $db_pass = 'password';
private $db_name = 'databasename';

private $where = array();
private $variables = array();
private $link;
private $functions = array(
'affected_rows' => 'mysql_affected_rows',
'client_encoding' => 'mysql_client_encoding',
'close' => 'mysql_close',
'connect' => 'mysql_connect',
'create_db' => 'mysql_create_db',
'data_seek' => 'mysql_data_seek',
'db_name' => 'mysql_db_name',
'db_query' => 'mysql_db_query',
'drop_db' => 'mysql_drop_db',
'errno' => 'mysql_errno',
'error' => 'mysql_error',
'escape_string' => 'mysql_escape_string',
'fetch_array' => 'mysql_fetch_array',
'fetch_assoc' => 'mysql_fetch_assoc',
'fetch_field' => 'mysql_fetch_field',
'fetch_lengths' => 'mysql_fetch_lengths',
'fetch_object' => 'mysql_fetch_object',
'fetch_row' => 'mysql_fetch_row',
'field_flags' => 'mysql_field_flags',
'field_len' => 'mysql_field_len',
'field_name' => 'mysql_field_name',
'field_seek' => 'mysql_field_seek',
'field_table' => 'mysql_field_table',
'field_type' => 'mysql_field_type',
'free_result' => 'mysql_free_result',
'get_client_info' => 'mysql_get_client_info',
'get_host_info' => 'mysql_get_host_info',
'get_proto_info' => 'mysql_get_proto_info',
'get_server_info' => 'mysql_get_server_info',
'info' => 'mysql_info',
'insert_id' => 'mysql_insert_id',
'list_dbs' => 'mysql_list_dbs',
'list_fields' => 'mysql_list_fields',
'list_processes' => 'mysql_list_processes',
'list_tables' => 'mysql_list_tables',
'num_fields' => 'mysql_num_fields',
'num_rows' => 'mysql_num_rows',
'pconnect' => 'mysql_pconnect',
'ping' => 'mysql_ping',
'query' => 'mysql_query',
'real_escape_string' => 'mysql_real_escape_string',
'result' => 'mysql_result',
'select_db' => 'mysql_select_db',
'set_charset' => 'mysql_set_charset',
'stat' => 'mysql_stat',
'tablename' => 'mysql_tablename',
'thread_id' => 'mysql_thread_id',
'unbuffered_query' => 'mysql_unbuffered_query'
);

function __construct() {

$this->link = $this->connect($this->db_host, $this->db_user, $this->db_pass);
if(!$this->link)
{
die('Could not connect: ' . mysql_error());
}

$this->select_db($this->db_name);
}

function __destruct() {
if($this->link)
{
mysql_close($this->link);
}
}

public function __call($name, $arguments) {
if(isset($this->functions[$name]))
{
return call_user_func_array($this->functions[$name], $arguments);
}
return FALSE;
}



}Step 3: Creating a user class
The user class isn't much, it provides easy access to the user's data, and handles simple functionality such as checking the user's password. I mentioned earlier that I wanted the class to scale with our database table, so I don't hard code any variables in the class.
<?php

class User {

private $userdata = array();

public function User() {

}

public function checkPassword($pass) {
if(isset($this->userdata['password']) && $this->userdata['password'] == md5($pass))
{
return true;
}
return false;
}

public function set($var, $value) { $this->userdata[$var] = $value; }

public function get($var) {
if(isset($this->userdata[$var]))
{
return $this->userdata[$var];
}
return NULL;
}
}The methods get, and set will be used to store information about the user.

dreemebird
01-03-2013, 12:58 AM
very good i want to download this attachment

Specific
01-07-2013, 11:20 AM
You can download the attachment after 6 or 7 posts.

bohimt
01-16-2013, 01:36 AM
thanks a lot man! :)

Rokitko
01-25-2013, 05:32 AM
very nice, it helped much, thanks

Rhinni
01-27-2013, 06:24 AM
Thanks, a very useful post. Helps alot.

Rhinni
01-27-2013, 06:31 AM
Quite annoying you need 6-7 posts to get the attachment. I understand it, but it also makes people post useless comments.

punt
01-27-2013, 02:46 PM
thank you very much for the user management system.

radiopop
02-04-2013, 09:08 AM
Thank you! its good for beginners to learn user class..

arpit.openxcell
02-06-2013, 04:47 AM
Nice Tutorial :

viveklucky1848
02-06-2013, 08:58 AM
I can't download the attachment by clicking, please make it available to download.

kertenkerem
02-07-2013, 06:32 AM
thanks so much. it's really usefull and really helped to me.

jew972
02-08-2013, 02:45 AM
thank you for the good post

eam.jay
02-09-2013, 04:02 AM
Sorry for double post, but I see one problem with this, once you are logged in it displayes the username and session at the top of the page, it like echoes it out? And I cant seem to find a way to hide it.

<?php
class basic{

private $username,$password,$name;

//putting the value to class properties for further use
public function post($Postedusername,$postedpassword)
{
$this->username=$Postedusername;

$this->password=$postedpassword;


}
//constructor for connecting the database
public function __construct()
{
$connect=mysql_connect("localhost","root","usbw") or die ("couldnt connect!");
mysql_select_db("prototype") or die ("couldnt find db");
echo "connected";
}

//inserting the data into data base
public function insert()
{
$inputusername=$this->username;
$inputpassword=$this->password;
$check=mysql_query("SELECT * FROM Register WHERE username='$inputusername'");
$count=mysql_num_rows($check);
if($count!=0)
{
echo"user already exist";

}
else
{
$insert=mysql_query("INSERT INTO register VALUES ('','$inputusername','$inputpassword')");

echo"inserted successfuly";
}

}
}
//creating the object of type basic
$user= new basic;
//calling the methodes
$user->post('ali','itsseceret');
$user->insert();
?>

holsteinkaa
02-15-2013, 05:11 AM
Thank you. Very inspring.

joshyvayalil
02-23-2013, 03:06 AM
very good i want to download this attachment

webjdeveloper
02-25-2013, 06:23 AM
this is really good it help me alot...

webjdeveloper
02-25-2013, 06:25 AM
haha i hope i can download it now..

webjdeveloper
02-25-2013, 06:37 AM
omg i can't download the file even i already post 7 messages?

rocken
02-26-2013, 09:48 PM
Thank you, good job

rocken
02-26-2013, 09:50 PM
thank you, need download attachment..

Chandrew
04-06-2013, 07:28 PM
Wow, very nice tutorial. I suppose the next step would be to write a register.php and use the createUser($username, $password, $email, $is_admin = FALSE) function.

When I get time, I want to try making a registration system based on admin approval, haha.

zhadrakas
08-11-2013, 03:50 AM
Nice Tutotial. Thankyou for sharing it

hedrow
08-28-2013, 04:52 PM
Just want to say thanks for this tutorial. Incredibly helpful!

hedrow
08-29-2013, 05:18 PM
Oh, and thanks greatly for the attachment :)

CiberRed
10-07-2013, 11:49 PM
:cool: THANKS FOR TUTORIAL

mhs409
10-13-2013, 06:03 PM
Thanks for the tutorial. Can't download the attachment though!

Chandrew
03-03-2014, 09:30 PM
if you don't mind, i put it on my github! Easier for me to reference

https://github.com/chandrewz/PHP_UserManager_OOP

santacruzlocal
03-11-2014, 02:25 AM
Nice post.

It would be great if you could revisit this and go into more detail taking it a little further.

For example dynamic content for registered users instead of just the old classic "Members Area"

Just a thought...

Amador84
05-25-2015, 10:31 AM
Thank you! This is exactly what I was looking for on the net, a simple and understandable object-oriented admin panel for php.

Amador84
05-25-2015, 10:35 AM
Thank you! This is exactly what I was looking for, a simple tutorial for a object-oriented admin system.