I am trying to have a flash intro on my site that can be disabled permanently (or specified time) via a click. I am obviously completely new to cookies and have tried a variety of ways to try and get this to happen. I can use the setcookie function above, not in the onclick action, and it will properly store the cookie. However I just cant get the cookie to save once it is in any type of action.
Thanks, your help is greatly appreciated!


$value = 'yes';
$cookiename = 'disableintro';

$disableintro = $_COOKIE[disableintro];
if (@$disableintro != "yes") { 
echo '<div id="OverWebVideo" style="position: fixed; bottom: 0px;"><object height="360" width="480" align="absmiddle" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="movienamehere.swf" name="movie" />
<param value="high" name="quality" />
<param value="transparent" name="wmode" />
<param value="false" name="menu" />                  <embed height="360" width="480" align="absmiddle" menu="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="movienamehere.swf"></embed>       </object> <br> <font style="text-align:center">   
</font><form><input type="submit" value="Disable" onclick="setcookie($cookiename,$value)" /></form> </div>';}