i have a table called users CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `username` varchar(65) NOT NULL default '', `password` varchar(65) NOT NULL default '', `group` int(4) NOT NULL default '0', `email` varchar(200) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM ROW_FORMAT=DYNAMIC COMMENT='© badmas' now what i want is a database login script and when create session or cookie for user group... if user=0 then show user features, if user=1 then show admin features.... is this possible??
Of course. I'd suggest you use the conditional to display the features via the navigation based on user status here's the logic: If (user_status=='1') { show_admin_features } else { show_basic_features }
First verify the user and pass against the database. If they are verified , then set the cookie and one more cooike to show the user group using if statement. Also on all pages ,always match all three cookie value or else by simple javascript injection, I can gain admin privileges . PM me if u want further help. Thanks and Regards.