From 75e443187facab5d15472e1abf9c2664882472cc Mon Sep 17 00:00:00 2001 From: TermOfficial <79934414+TermOfficial@users.noreply.github.com> Date: Mon, 18 Apr 2022 07:10:27 -0400 Subject: [PATCH] should probably global that --- framework.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework.php b/framework.php index fdacd9a..ee55145 100644 --- a/framework.php +++ b/framework.php @@ -78,6 +78,7 @@ function setup(){ $setup = $db->prepare("CREATE TABLE `".$dbname."`.`bans` ( `uid` INT(10) NOT NULL ) ENGINE = MyISAM;"); $setup->execute(); if($setup->error){ + echo "Failed, DB is probably already setup"; return $setup->error(); } else { return 1; @@ -163,6 +164,7 @@ function logout(){ setcookie('username', null, -1, '/'); return 1; } else { + global $_SESSION; session_destroy(); return 1; } @@ -172,5 +174,5 @@ function logout(){ function checktoken($username, $token){ return "not implemented"; } -//checkver("b1026"); +//checkver("b1027"); ?>