mysql - PHP Display Button if Certain Value is So and So -
I am currently programming a PHP application, and I am wondering if it is possible only for a link If a certain database variable is so and so much. For example, PHP has been tested, if the currently logged in user's value is "admin" below the "rank" variable in the table, and if it is, display the link. If not, do not show anything.
Many thanks, and if someone is confused, then I am ready to give more information.
The cool thing about PHP is that you can use HTML & amp; Both the PHP code and your answer here are:
& lt ?? Php if ('databasefield' === 'value to compare') {? & Gt; HTML LINK TAG & lt ;? Php}? & Gt; Use === instead of === Because you want to match your session value with the database value and also in the case of login. Therefore, for security purposes use === It will check the value type along with both the variables.
Feel free to ask about any doubts here.
Comments
Post a Comment