I am trying to write code for a site for my consulting practice. I know how to have a database and how to manage users on the site. But now I want to charge users for custom features they want me to build from ground up. (e.g they want an option to upload pictures or ability to get certain reports via 3rd party API, which for purposes of this example is unique) So, my question is when they log in with their ID, how do i write a php code that shows only that particular option/features/page for that particular user?
+1
A:
How do you track the logged in user, in a session? You could do something simple like:
<?php
if ($_SESSION['userid'] == 4) {
include('special_feature.php');
} ?>
To embed a certain block of code only for a certain user (or pull that user list from the database)...
Fosco
2010-08-02 12:20:51
Yes, I am using sessions. But it will be difficult to do it for 45k users. Wouldn't that slow down processes?
2010-08-02 21:22:42
the block above wouldn't slow anything down..
Fosco
2010-08-02 22:00:40