From 32df2cde0af156988b741281390aed5e6beb9dc0 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Thu, 16 Feb 2023 20:51:20 +0100 Subject: [PATCH] donations.php cleanup --- donations/donations.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/donations/donations.php b/donations/donations.php index c684f8c..ec638c4 100644 --- a/donations/donations.php +++ b/donations/donations.php @@ -4,14 +4,14 @@ require $_SERVER['DOCUMENT_ROOT'] . '/databaseConnection/databaseConnection.php' $conn = getDatabaseConnection(); $sql = "SELECT `value` FROM `dolibarrInformation` WHERE `information` = 'apiKey'"; $result = $conn->query($sql); -//$dolibarrAPIKey = mysql_fetch_array($result)["value"]; -$dolibarrAPIKey = "eM6A2bQP36Q7dhELq02qnD7sY4do5KRa"; +$dolibarrAPIKey = $result->fetch_assoc()["value"]; +//$dolibarrAPIKey = "eM6A2bQP36Q7dhELq02qnD7sY4do5KRa"; $conn = getDatabaseConnection(); $sql = "SELECT `value` FROM `dolibarrInformation` WHERE `information` = 'url'"; $result = $conn->query($sql); -//$dolibarrURL = mysql_fetch_array($result)["value"]; -$dolibarrURL = "https://dolibarr.romanschenk.ch/"; +$dolibarrURL = $result->fetch_assoc()["value"]; +//$dolibarrURL = "https://dolibarr.romanschenk.ch/"; function createDonation($amount, $dolibarrURL, $dolibarrAPIKey) {