Jump to content

multi-level user


jwadenpfuhl

Recommended Posts

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.10
MySQL 3.23.58
Link to comment
https://forums.phpfreaks.com/topic/28709-multi-level-user/
Share on other sites

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.