No instructions on DB init
Closed this issue · 3 comments
With the lack of any instructions on initializing a database, whether to load the root index.php of the application, the index.php with the sub-folder "leaderboard", what to do with the admin folder... There's nothing to go by on using this. C'mon.
Upon first user attempt to "sign-up", the browser shows:
Warning
: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in
/Applications/XAMPP/xamppfiles/htdocs/leaderboard/sign_up.php
on line
29
Warning
: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in
/Applications/XAMPP/xamppfiles/htdocs/leaderboard/sign_up.php
on line
49
could not enter data: Table 'leader1.user' doesn't exist
...and the PHP processor logs:
PHP Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in /Applications/XAMPP/xamppfiles/htdocs/leaderboard/sign_up.php on line 29
PHP Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in /Applications/XAMPP/xamppfiles/htdocs/leaderboard/sign_up.php on line 49
With the lack of any instructions on initializing a database, whether to load the root index.php of the application, the index.php with the sub-folder "leaderboard", what to do with the admin folder... There's nothing to go by on using this. C'mon.
Upon first user attempt to "sign-up", the browser shows:
Warning
: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in
/Applications/XAMPP/xamppfiles/htdocs/leaderboard/sign_up.php
on line
29Warning
: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in
/Applications/XAMPP/xamppfiles/htdocs/leaderboard/sign_up.php
on line
49could not enter data: Table 'leader1.user' doesn't exist
...and the PHP processor logs:
PHP Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in /Applications/XAMPP/xamppfiles/htdocs/leaderboard/sign_up.php on line 29
PHP Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in /Applications/XAMPP/xamppfiles/htdocs/leaderboard/sign_up.php on line 49
HOW TO SET UP THIS PROJECT LOCALLY
-
You must have local developer server installed on your machine like XAMPP, WAMP, LAMP
-
Clone the repository to your local machine:
git clone https://github.com/geektutor/Leaderboard.git
- Move the cloned folder to:
a. for XAMPP: htdocs folder
b. for WAMP: www folder
-
Create a database and name it anything you like. Just make sure you edit the config/connect.php and change the db_name to your database name
-
Run this sql file on your local server in the database you created "mushpgwz_leaderboard.sql"
-
Start your local developer server
-
The project will be available at localhost/Leaderboard
I see you've provided a DB schema... but it's populated with 1700+ users and thousands of other table entries. I'm not going to load this SQL into a DB...
So I emptied all of the tables, and upon submitting the signup form I get:
could not enter data: Field 'participation' doesn't have a default value
No PHP errors...
What is this "Certificate of Participation" stuff?
./admin/cert.php: Certificate of Participation
./user/certification.php: $participation = $row['participation'];
./user/certification.php: Certificate of Participation
./certificate.md:* Choose the certificate you want to download (participation or performance)
Is this framework from a class you took? "30DayOfCode 2020"?
I realize now that this isn't a leaderboard application.