Hello, I am havin trouble with this code:
if ($_GET['offline']) {$extranet = $_GET['offline'];} else {$extranet = $online;}
$sql = mysqli_query($db,"UPDATE tbl_system SET value = '$extranet' WHERE property = 'extranet'");
echo $_GET['offline'];
echo $extranet;
echo $online;
In the database, the value of the field where the property = extranet is 1. Results of echo:
$_GET['offline'] = 0 $extranet = 1 $online = 1
Now, obviously, something's wrong here.
The URL to give this GET is: ?app=admincp&offline=0, so $_GET['offline']
is not the problem.
The problem must lie in the if statement, but I can't figure it out,
Any ideas?