Copy link to clipboard
Copied
Hi all,
I'm creating an admin area for a client and I have a field in the user table which is a set with the option of 'y' 'n'. If the user has 'y' then I want them to be able to see a couple of buttons that the user with 'n' cannot see. How can I go about this? I'm working in PHP by the way.
Cheers
Tom
Can we safely assume you have queried the necessary data into an array with your query?
If so, where you want this one particular button to go, you just need to use an if statement:
<?php if ($QueryArray['fieldx'] == "y" ) { echo "My Button"; } ?>
Copy link to clipboard
Copied
Can we safely assume you have queried the necessary data into an array with your query?
If so, where you want this one particular button to go, you just need to use an if statement:
<?php if ($QueryArray['fieldx'] == "y" ) { echo "My Button"; } ?>
Copy link to clipboard
Copied
You can safely assume that yes.
It looks as if it will work perfectly. Cheers
T
Find more inspiration, events, and resources on the new Adobe Community
Explore Now