[dfads params=’groups=-1′]
Today, I came up with a solution for how to make an inbuilt Admin Panel with already coded Login module in codeigniter. Just follow the steps below to setup into your project.
1. Download the adminPanelWithLogin.zip file. Extract it. Copy the respective admin folders to the Controllers, Models, & Views of your project.
2. Create the MySQL table & populate data.
[sql]
CREATE TABLE IF NOT EXISTS `tbl_admin` (
`admin_id` int(4) NOT NULL AUTO_INCREMENT,
`admin_name` varchar(128) NOT NULL,
`admin_email` varchar(64) NOT NULL,
`admin_password` varchar(64) NOT NULL,
`admin_role` int(2) NOT NULL,
`admin_status` int(1) NOT NULL,
PRIMARY KEY (`admin_id`)
) ENGINE=MyISAMÂ DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;
INSERT INTO `tbl_admin` (`admin_id`, `admin_name`, `admin_email`, `admin_password`, `admin_role`, `admin_status`) VALUES
(1, ‘admin’, ‘admin’, ‘admin_123’, 1, 0),
(13, ‘super’, ‘super’, ‘super_123’, 1, 1);
[/sql]
3. Check whether the database & session are initiated by exploring to application/config/autoload.php file.
[php]$autoload[‘libraries’] = array(‘database’, ‘session’); [/php]
4. Browse the admin login from you browser: http://localhost/your_project/admin. A screen must appear like this:
5. Use the default admin user as “admin ” and Password as “admin_123” then press Login. You will be redirected to a secure home page like this:
You can further add modules of your choice & code your project as you like.
Feedbacks & suggestions are always welcome.
[dfads params=’groups=-1′]