[MX04] AS problem (loading variables from PHP), probably syntax

I have the following AS code attached to a movieclip:

onClipEvent (load) {
loadVariables("[http://localhost/flashvars.php](http://localhost/flashvars.php)", this, "GET");
 
if (daylight==1) { //daylight
	this.gotoAndStop(1);
	this._parent.sky.gotoAndStop(1);
	this._parent.lights.gotoAndStop(1); 
} else if (daylight==0) { //night
	this.gotoAndStop(5);
	this._parent.sky.gotoAndStop(5);
	this._parent.lights.gotoAndStop(5); 
}
}

The variable daylight comes from this PHP-script:

<?
$hour = date("H");
if ($hour >= 18 OR $hour < 7) { // night
$daylight = '0';
} else { // daylight
$daylight = '1';
}
echo "daylight=$daylight";
?>

With the var daylight set to ‘0’ or ‘1’, a couple of mc’s (‘sky’,‘lights’) are told to jump to frame 1 or 5, but it seems that my if-loop doesn’t work well. I placed a dynamic textfield in this same mc which displays the var directly from the PHP-script to see if the var is imported correctly and that works fine. I hope I made myself clear, does somebody know what I’m doing wrong?