On 2/17/2010 3:53 PM, [email protected] wrote:
> Hi,
>
> I'm trying to restrict some download action. I email yesterday. I was
> looking into the cookies for validation. I have looked at
> httpvariables but...
>
> 1. How can I assign a cookie value when people click on an external
> link?
You'd need to hook into the javascript click event, and log the cookie 
from javascript. However, unless you tie the cookie to some form of 
token/id on the server-side, you should not rely on the presence/value 
of a cookie for anything which needs to be secure.


> 2. How do I display conditionally on another page, an image or a text
> based on the value of the cookie?
Again, use javascript to read the value of the cookie, and set the image 
src to whatever image you want.


   ~ ~ Dave

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to