|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Set cookie on click
How can I set a cookie once a user clicks on a link in a page. Basically, the page is a disclaimer page, if they click the link the cookie would be set. If the link is not clicked, then the cookie is not set.
|
|
#2
|
|||
|
|||
|
RE: Set cookie on click
you mean onclick like with javascript, or on click it reloads the page and setcookie() ?
|
|
#3
|
|||
|
|||
|
RE: Set cookie on click
Java script would be fine. I just don't don't know how to write the code. Any help would be appreciated.
|
|
#4
|
|||
|
|||
|
Message Moved
Thread moved from 'PHP Coding' to 'Client Side Things' by notepad.
Reason: :-P |
|
#5
|
|||
|
|||
|
RE: Set cookie on click
This might work, but would it possible to add a redirect after setting the cookie, this way all the events could happen on one page? Also, what happens if neither yes or no are present. Meaning what if they come to the page without a variable in the URL?
<p><a href="disclaimer.php?accept=yes">I accept</a> | <a href="disclaimer.php?accept=no"></p> Thanks for your help |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Set cookie on click |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|