Forum Moderators: open
Code:
<?php
if(isset($_COOKIE['pollchoice']))
echo "<script type='text/javascript' language='javascript'>document.getElementById('pollarea').innerHTML=\"poll results here\"</script>";
?> Any ideas? I'm sure this is much easier than I'm making it :P
It would be simpler to write directly:
<div id="pollchoice"><?php
if (isset($_COOKIE['pollchoice'])) echo "poll results here";
?></div>
or, if you don't need the empty div:
<?php
if (isset($_COOKIE['pollchoice'])) echo "<div id=\"pollchoice\">poll results here</div>";
?>