J
J
jaffrey2016-11-03 21:55:57
PHP
jaffrey, 2016-11-03 21:55:57

How to hide an element after authorization?

There are buttons that need to be hidden after authorization. How will the HTML code of these buttons look inside PHP in this case (if the session is empty - show, if not - hide)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Skogorev, 2016-11-03
@jaffrey

something like

if($_SESSION['auth'] != 1){
echo "<button>sdfsdf</button
}

I really don't know where you store the value, but after authorization, set session auth = 1

M
Max, 2016-11-03
@MaxDukov

check some key from cookie?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question