jwadenpfuhl Posted November 28, 2006 Share Posted November 28, 2006 okay, I'm needing help creating a multi-level user registration. What I mean by that is this:"Joe" registers for a vendor account. He chooses the "Dealership" purchase plan.I need that purchase plan variable to "stick" to this user every time he logs in. I also need the purchase plan variable to determine which page he goes to when he logs in(different pages for different prices). I can get the user logged in without any issue. The problem arises when I try to log in the user and divert him according to his purchase plan.Hope this makes sense. Any help is most appreciated.PHP 4.3.10MySQL 3.23.58 Link to comment https://forums.phpfreaks.com/topic/28709-multi-level-user/ Share on other sites More sharing options...
genericnumber1 Posted November 28, 2006 Share Posted November 28, 2006 I cant provide any direct code (I can't do PHP4 OOP) but it sounds like a good place to use some OOP inheritance, and tie the person's username in the database to their current purchase plan...Such as "dealership extends basic_member" then override the basic_member's starting page variable with the dealership's starting page variable in the dealership class... (as if that couldn't be worded any better)Another way would be to hardcode it into the script, and just set it in the page, retrieve the purchase plan they're on, and then say [code=php:0]if(purchaseplan == blah) { $startpage = "blahs_start_page.php";}[/code]I'd prefer the former method of class inheritance though.... Link to comment https://forums.phpfreaks.com/topic/28709-multi-level-user/#findComment-131468 Share on other sites More sharing options...
c_shelswell Posted November 28, 2006 Share Posted November 28, 2006 this might help you it's a really good tutorial for a login page with remember fetures and the ability to set user levels. I've got it working with my site to allow people of varying degrees different access around my site.[url=http://www.evolt.org/article/PHP_Login_System_with_Admin_Features/17/60384/index.html]http://www.evolt.org/article/PHP_Login_System_with_Admin_Features/17/60384/index.html[/url] Link to comment https://forums.phpfreaks.com/topic/28709-multi-level-user/#findComment-131485 Share on other sites More sharing options...
jwadenpfuhl Posted November 28, 2006 Author Share Posted November 28, 2006 Sweet. Thanks to you both I now have it working.Thanks for your help! Link to comment https://forums.phpfreaks.com/topic/28709-multi-level-user/#findComment-131587 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.