removed config.php
This commit is contained in:
parent
19f3cb4cf7
commit
406c1298d6
3 changed files with 10 additions and 23 deletions
12
README.md
12
README.md
|
@ -20,10 +20,16 @@ Anyways, let's get to the *how*.
|
||||||
- The database is documented through comments viewable in phpmyadmin,
|
- The database is documented through comments viewable in phpmyadmin,
|
||||||
if you have trouble displaying them in your database manager, let me know
|
if you have trouble displaying them in your database manager, let me know
|
||||||
and I might get to writing some basic setup instructions here.
|
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
|
- Please create the file `docs/common/config.php` which will store database
|
||||||
database that will then be used in `docs/common/header.php`
|
credential that will then be used in `docs/common/header.php`
|
||||||
to connect to it and set the global variable `$conn` to the PDO
|
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.
|
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
|
- If you have problems connecting to the database, you can try
|
||||||
printing the PDO exception being caught there in the function
|
printing the PDO exception being caught there in the function
|
||||||
`attempt_sql_connect()`, but be careful not to leave it in production, as
|
`attempt_sql_connect()`, but be careful not to leave it in production, as
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* This file is for storing your personal information (such as database login).
|
|
||||||
* These constants will be most likely used in header.php
|
|
||||||
* for logging in to different internal services.
|
|
||||||
* It is critical that if you enter your details here,
|
|
||||||
* you do not commit the changes into any public repository.
|
|
||||||
* In the original repository [https://github.com/Zeftax/personal-homepage.git]
|
|
||||||
* this file is set to not track any changes, but it is better to check and
|
|
||||||
* be safe, than leak your internal logins and have people screwing with
|
|
||||||
* your database.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// SQL database login info (Place your info here).
|
|
||||||
define("SQL_HOSTNAME", "");
|
|
||||||
define("SQL_USERNAME", "");
|
|
||||||
define("SQL_PASSWORD", "");
|
|
||||||
define("SQL_DATABASE", "");
|
|
||||||
?>
|
|
|
@ -68,7 +68,7 @@ function attempt_register($conn, $username, $password, $passwordConf) {
|
||||||
// set errors, old values, and return.
|
// set errors, old values, and return.
|
||||||
if($result || strtolower($username) == "[deleted]" ||
|
if($result || strtolower($username) == "[deleted]" ||
|
||||||
strtolower($username) == "[guest]" ||
|
strtolower($username) == "[guest]" ||
|
||||||
strtolower($username) == "zeftax") {
|
strtolower($username) == "zdenek") {
|
||||||
$usernameErr = "This username is not available";
|
$usernameErr = "This username is not available";
|
||||||
$usernameOld = $username;
|
$usernameOld = $username;
|
||||||
$passwordOld = $password;
|
$passwordOld = $password;
|
||||||
|
|
Loading…
Reference in a new issue