0
0

Moved all configurations away from $GLOBALS to independent variables

This commit is contained in:
Bryan Pedini
2019-07-18 11:38:03 +02:00
parent f2a56c2abc
commit 68884270f3
9 changed files with 44 additions and 44 deletions

View File

@@ -19,7 +19,7 @@
echo ( json_encode ( $response ) );
exit;
}
$database = new Database ( $GLOBALS [ 'config' ] [ 'db' ] );
$database = new Database ( $config [ 'db' ] );
$database->connect ( );
$url = $_POST [ 'url' ];
$database->prepare ( "INSERT INTO `links` ( `URL`, `created_by` ) VALUES ( :url, " . $_SESSION [ 'user_id' ] . " );" );