| | |
Displaying a link based on permission
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2005
Posts: 6
Reputation:
Solved Threads: 0
I have created a login script using a session. Anyone can log into the website but I want to make it so a particular link is only shown if the user has permission.
In the database, access is shown simply by a Y or N (for Yes or No). If the user has a Y in the field, I want them to see the link when they login.
Thanks for your help!
In the database, access is shown simply by a Y or N (for Yes or No). If the user has a Y in the field, I want them to see the link when they login.
Thanks for your help!
•
•
Join Date: Jul 2004
Posts: 494
Reputation:
Solved Threads: 21
Sounds like a job for an "if" statement to me.
PHP Syntax (Toggle Plain Text)
if (1 == $login) { if (true == $see_link) { echo "Link"; } else { // Do Nothing } }
www.uncreativelabs.net
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
•
•
•
•
Originally Posted by Puckdropper
Sounds like a job for an "if" statement to me.
PHP Syntax (Toggle Plain Text)
if (1 == $login) { if (true == $see_link) { echo "Link"; } else { // Do Nothing } }
![]() |
Similar Threads
- ASP paging (ASP)
- Three Way Link Exchange (Relevant Link Exchanges)
- What Am I Doing Wrong? (Search Engine Optimization)
- Alexa's Measuring System (Promotion and Marketing Plans)
- Online Computer stores? (Geeks' Lounge)
- Afilates (Geeks' Lounge)
Other Threads in the PHP Forum
- Previous Thread: list box --php issue
- Next Thread: Need HELP in pagination (PHP)
| Thread Tools | Search this Thread |
apache api array auto beginner binary broken cache cakephp checkbox class cms code codingproblem cron curl customizableitems database date display dynamic echo email error errorlog file files filter folder form format forms forum function functions gc_maxlifetime global google headmethod host href htaccess html image include insert ip javascript joomla limit link login mail malfunctioning memmory memory menu mlm multiple mysql nodes oop parameter parsing paypal pdf php phpmysql popup query radio random recursion recursiveloop remote script search select server sessions snippet source space sql static survey syntax system table trouble tutorial up-to-date update upload url validator variable video web youtube





