From 406c1298d633472934153a9145dba2e3b86c8ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20Borovec?= Date: Tue, 7 May 2024 18:05:21 +0200 Subject: [PATCH] removed config.php --- README.md | 12 +++++++++--- docs/common/config.php | 19 ------------------- docs/www/register.php | 2 +- 3 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 docs/common/config.php diff --git a/README.md b/README.md index 350018e..bbb0b5b 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,16 @@ Anyways, let's get to the *how*. - The database is documented through comments viewable in phpmyadmin, if you have trouble displaying them in your database manager, let me know and I might get to writing some basic setup instructions here. - - In the file `docs/common/config.php` you can set the connections to your - database that will then be used in `docs/common/header.php` - to connect to it and set the global variable `$conn` to the PDO + - Please create the file `docs/common/config.php` which will store database + credential that will then be used in `docs/common/header.php` + to connect to the db and set the global variable `$conn` to the PDO connection object, you can use that in your own functions, if you add any. + - The file should define the following constants: + - SQL_HOSTNAME + - SQL_USERNAME + - SQL_PASSWORD + - SQL_DATABASE + - Remember to enable pdo_mysql in yourr php.ini. - If you have problems connecting to the database, you can try printing the PDO exception being caught there in the function `attempt_sql_connect()`, but be careful not to leave it in production, as diff --git a/docs/common/config.php b/docs/common/config.php deleted file mode 100644 index fd2cf19..0000000 --- a/docs/common/config.php +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/docs/www/register.php b/docs/www/register.php index c0d32c6..b1cbb5b 100644 --- a/docs/www/register.php +++ b/docs/www/register.php @@ -68,7 +68,7 @@ function attempt_register($conn, $username, $password, $passwordConf) { // set errors, old values, and return. if($result || strtolower($username) == "[deleted]" || strtolower($username) == "[guest]" || - strtolower($username) == "zeftax") { + strtolower($username) == "zdenek") { $usernameErr = "This username is not available"; $usernameOld = $username; $passwordOld = $password;