I'm trying to try and check if a value is equal to one,
variables.php
<?php
$server = "localhost";
$username = "root";
$password = "xxxx";
$dbName = "website2";
$link = mysql_connect($server, $username, $password, $dbName);
$maintenanceMode = mysqli_query($link, "SELECT * FROM website_checks WHERE maintenanceMode = '1'");
?>
index.php
<?php
include 'mysql/variables.php';
?>
<?php
if ($maintenanceMode == '1') {
echo "hello";
} else {
echo mysql_error();
}
?>
I get no error. Please help?
thanks inadvance!