I've used a cookie to select which style sheet displays on a page, but have found that I have to click on a link twice before the changes are reflected.

I have the following in the header
PHP Code:
setcookie ('select-stylesheet'$chosentime()+31536000'/''mydomain.com''0'); 
and the following in the body where I want a visitor to be able to select the style sheet they view

HTML Code:
<a href="?chosen=default">default sheet</a>
Any ideas as to why this might happen?