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

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -