| | |
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 |
ajax apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code countingeverycharactersfromastring crack cron curl database date decode display dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link login loop mail match md5 menu mlm multiple mysql mysql_real_escape_string oop paypal pdf php problem protocol query radio random recursion regex remote script search server session sessions sms smtp soap source space sql strip_tags survey syntax system table tutorial undefined update upload url validator variable video virus votedown web window.onbeforeunload=closeme; xml youtube





