believeinsharing Posted June 4, 2012 Share Posted June 4, 2012 Hi, I have one php page named as index.php which contains one 'form' and one 'table', both are in different div Now i have two different types of users 'admin' and 'nonadmin'. If user log in as 'admin' he can see whole index.php (with form and table), and if user login as 'nonadmin' he can see only half part of index.php page (only form). I knw there are ways to do it like use css hide n show function.. but confuse about the logic to do that. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/263661-display-part-of-page-in-php/ Share on other sites More sharing options...
Psycho Posted June 4, 2012 Share Posted June 4, 2012 You would never want to "hide" the content using style properties. You should instead determine of the user is a normal user or admin and then only output the relevant content. $userType = {SOME PROCESS TO DETERMINE USER TYPE }; echo "This is output for all users"; if($userType =="ADMIN") { echo "This is output for all users"; } Quote Link to comment https://forums.phpfreaks.com/topic/263661-display-part-of-page-in-php/#findComment-1351213 Share on other sites More sharing options...
believeinsharing Posted June 5, 2012 Author Share Posted June 5, 2012 thx will try this Quote Link to comment https://forums.phpfreaks.com/topic/263661-display-part-of-page-in-php/#findComment-1351263 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.