i’ve read the cookies tutorial on w3schools BUT i do not fully understand it so i’ve come to ask this question over here to know more about it. Let’s say we have two buttons, an UP button and a DOWN button, when the user clicks on either one of the buttons (and the cookie will be set here), both the buttons will be unclickable until that user clears his/her cookies. Any idea on how to do that?
Share
You control the cookies as you control the $_REQUEST, $_POST, $_GET and $_SESSION arrays using $_COOKIES.
You can set teh cookie with the function:
And you can clear or get the cookie value acessing the $_COOKIE array:
Or use the function above:
After that you can make something like that in the page:
OffButton
OnButton