It makes an error, all I want it to do is return $fcEnable as the result from the database within this class…….
Parse error: syntax error, unexpected T_VARIABLE in
/home/site/page.php
$VisitorIP = ip2long($_SERVER['REMOTE_ADDR']);
$IPCheckQ = mysql_query("SELECT * FROM `blah` WHERE `ip` = '" . $VisitorIP . "'");
$IPCheckR = mysql_fetch_array($IPCheckQ);
class GeoIP extends Page {
public $fcEnable = $IPCheckR['x'];
}
You cannot assign another variable to a var inside the class.