I've been messing with this for a couple of days and it just won't quite work correctly. I have to use php otherwise I probably would have this working in javascript.
All I am trying to do is have an intro movie play. Ideally i'd like to have a checkbox that once check sets a cookie that the script checks and determines if the user has disabled the movie.
Right now I think I'm close however anytime I access this page it sets the cookie regardless of whether I click the submit button.
Any idea of where I am going wrong?
Thanks!
<?php ob_start(); ?>
<?php
$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="moviename.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="moviename.swf"></embed> </object> <br> <form method="POST" action="">
<input type="submit" name="submit" /><br />
</form> </div>';}
?>
<?php
if(isset($_POST['submit'])) {
setcookie('disableintro', 'yes', time()+60*10);
}
?>