Pass information to the user via cookies

Asked

Viewed 23 times

0

Ai, good wanted to know how do I pass information to the user through the cookie (when he is logged in appears profile button, if he is admin appears create product button, etc etc) thanks I researched some things on the internet, but the articles and videos I found I could not understand well.

  • I wouldn’t recommend doing this by checking for cookies. To identify the user, if you are logged in and if you are an administrator you must have already used sessions; use them in the same way to decide what content to deliver to the user. It’s basically a if in PHP that defines HTML.

  • Thanks for the tip

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.