diff --git a/functions.php b/functions.php index 0004ba5..e7a5cd7 100644 --- a/functions.php +++ b/functions.php @@ -19,7 +19,7 @@ function adminCheck() { } } -function startDB() { +function startDB() { // Code for connecting to the database from https://www.sitepoint.com/re-introducing-pdo-the-right-way-to-access-databases-in-php/ $server = 'mysql'; $username = 'student'; $password = 'student'; @@ -84,7 +84,7 @@ function getFirstAllMatches($tableName, $constraintCol, $constraint) { return executeAllQuery($tableName, $constraintCol, $constraint)->fetch(); } -function imageUpload($name) { +function imageUpload($name) { //Code for uploading an image. Modified from https://www.w3schools.com/php/php_file_upload.asp $imgDir = 'public/images/auctions/'; $file = $imgDir . $name; $okFlag = true; diff --git a/public/account/editAuction.php b/public/account/editAuction.php index 0dbffc0..99a7962 100644 --- a/public/account/editAuction.php +++ b/public/account/editAuction.php @@ -4,7 +4,6 @@ $stylesheet = '../assets/ibuy.css'; require_once '../../functions.php'; checkListing(); -$pdo = startDB(); $listing = getListing(); $pageContent = '