I have developed a MLM system and now what I need is to have the feature of different homepage for different users.Is that possible ?
Any idea ?
| SitePoint Sponsor |



I have developed a MLM system and now what I need is to have the feature of different homepage for different users.Is that possible ?
Any idea ?
Well I don't know how you are tracking your users but I would store the users into groups, and display web pages depending on the groups.
PHP Code:<?php
switch($groupid)
{
case 1:
include('group1homepage.php');
break;
case 2:
include('group1homepage.php');
break;
}
?>




haha, I was gonna suggest a CMS or MVC, but from the looks of post priyakochin seems new in PHP and building his own. So, don't want to take the excitement away by throwing something that's already done.
However, I do agree with you.




CMS? MVC? I don't see how even apply to his question... But chances are if he's willing to build his own, he's at least making an attempt to learn you could at least encourage his attempts at knowledge by providing him with information. If he doesn't know or understand he'll ask for clarification or better yet go searching for clarity.
Creativity knows no other restraint than the
confines of a small mind. - Me
Geekly Humor
Oh baby! Check out the design patterns on that framework!



I was referring to my example. First I wanted to suggest a MVC, so he can learn about it and build a good software from that framework. And from my experience you don't even have to an expert to get the basics of a framework.
However, then I realized, he probably isn't familiar with the switch statements, or perhaps he's looking for the quickest way to accomplish what he wants to do. That's why I suggested that.
What would you recommend? It's not his question but from your suggestions, it seems you got much better information. I am curious to learn as well.
Edit:
Some methods would be.
1) Build a membership database where users are assigned to specific groups. And depending on the group you load contents.
2) If the memberlist isn't that big, then you can store the user ids in a file, and later parse it to generate customized pages for different users.




It would be far simpler to just create a template for each user when an account is created.
Creativity knows no other restraint than the
confines of a small mind. - Me
Geekly Humor
Oh baby! Check out the design patterns on that framework!







Creativity knows no other restraint than the
confines of a small mind. - Me
Geekly Humor
Oh baby! Check out the design patterns on that framework!
Bookmarks