Show link based on permission

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Eiolon
Forum Newbie
Posts: 17
Joined: Tue Feb 14, 2006 1:42 pm

Show link based on permission

Post by Eiolon »

I have a link that I only want people with permission to be able to see it. I have a field in the table that is:

Code: Select all

`link` enum('N','Y') NOT NULL default 'N',
If it is set to Y then I want the user to see the link, if N then not see it. Any help would be appreciated. Thanks!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Select the link field in a SQL statement, read the result into a var, then compare the var and, if it evaluated to true, show it.
Post Reply