Hi,
Never thought I would need to post here about undefined variables, normally they are easy to track down but this one has baffled me.
In the file named config.php I have this:
$sqlb = $mysqli->query("SELECT * FROM config");
if ($mysqli->connect_errno) {
printf("Connect failed: %s\n", $mysqli->connect_error);
exit();
}
if ($sqlb->num_rows > 0) {
while ($rowa = $sqlb->fetch_object())
{
$url = $rowa->adminurl;
$email = $rowa->support_email;
$legal = $rowa->legal;
$siteurl = $rowa->url;
}
}
In the config.php file I have this:
function BASE_URL()
{
define('BASE_URL',$url);
}
I dont understand why $url is not defined when it appears as
$url = $rowa->adminurl;