# Php checking for cookie issue

**URL:** <https://forum.kirupa.com/t/php-checking-for-cookie-issue/186840>\
**Category:** Uncategorized\
**Created:** [April 24, 2006, 11:11pm UTC](https://forum.kirupa.com/t/php-checking-for-cookie-issue/186840 "2006-04-24T23:11:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![castlestudio](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@castlestudio](https://forum.kirupa.com/u/castlestudio)\
**Post date:** [April 24, 2006, 11:11pm UTC](https://forum.kirupa.com/t/php-checking-for-cookie-issue/186840/1 "2006-04-24T23:11:05Z")

</div>

i’m trying to get flash to check for the presence of a cookie through php, but i’m getting bad results.  
here’s my php code:

\<?php  
if(isset($\_COOKIE[‘tbmpollchecker’])){  
print ‘&var1=true’;  
}  
?\>

here’s my actionscript:

onClipEvent(load){  
cookieLV = new LoadVars();  
cookieLV.load(“cookie.php”);  
cookieLV.onLoad = function(success:Boolean){  
var cookieCheck:Boolean = this.var1;  
lvChecker.text = otherVar;  
trace("var1 = "+ cookieCheck);  
if(cookieCheck == true){  
gotoAndStop(“show”);  
}  
}  
}

here’s the result of the trace command:

var1 = true’;  
}  
?\>

so, what stupid, noobie mistake am i making?
