diff options
author | Alex Vitkov <alexvitkov98@gmail.com> | 2021-01-29 13:43:53 +0200 |
---|---|---|
committer | Alex Vitkov <alexvitkov98@gmail.com> | 2021-01-29 13:43:53 +0200 |
commit | dcf61354050bfe81d6983f1aec34d7d3d6733a0d (patch) | |
tree | 87535d87bc498d8d852f30bb1de96864d68e9ba4 /php/database.php | |
parent | 33e533d28dbf9ad7bfc7ad9af467e5efe25ae8a0 (diff) | |
download | fileup-dcf61354050bfe81d6983f1aec34d7d3d6733a0d.tar.gz |
index.html + login.html => index.php
those files had the entire HTML tree duplicated, which would make it
difficult to make any changes to the front end. this commit combines the
two files in one, with some front-end JS to switch between the login and
register forms.
Diffstat (limited to 'php/database.php')
-rw-r--r-- | php/database.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/php/database.php b/php/database.php index ef2b825..f472cbf 100644 --- a/php/database.php +++ b/php/database.php @@ -16,14 +16,8 @@ require_once "misc.php"; global $database_username; global $database_password; global $database_location; - try - { + $this->pdo=new PDO("mysql:dbname={$database_name};host={$database_location}",$database_username,$database_password); - }catch(PDOException $e) - { - error_log("Could not get database {$database_name} from {$database_location}, {$e} "); - die("The cow bought the farm"); - } } /*returns false if this isn't a user, otherwise returns the user*/ |