Skip to content

Iqbolshoh/php-test-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

109 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ PHP Test Platform

PHP Test Platform is a full quiz-creation and testing web app: registered users can build subjects made up of five different question formats β€” multiple choice, true/false, dropdown, fill-in-the-blank, and matching β€” and share a public link so anyone can take the quiz and get scored instantly. It includes session-based authentication with multi-device session management and an AdminLTE-powered admin panel for managing subjects, questions, and results.

PHP MySQL License

Home Page

πŸ“š Table of Contents

✨ Features

1️⃣ Five Question Formats πŸ“‹

βœ… Multiple choice β€” question with any number of options and one correct answer. βœ… True / False β€” quick statement-based questions. βœ… Dropdown β€” pick the correct answer from a select list. βœ… Fill in the blank β€” free-text answer, matched case-insensitively. βœ… Matching β€” pair a left-side term with its right-side value.

2️⃣ Shareable Public Quizzes πŸ”—

βœ… Every subject gets a clean, unique URL slug (e.g. /test.php?url=mathematics). βœ… Anyone with the link can take the quiz β€” no account required. βœ… Instant scoring with a percentage breakdown on submit.

3️⃣ Authentication & Sessions πŸ”

βœ… Signup/login with hashed passwords and CSRF-protected forms. βœ… Persistent login via secure cookies. βœ… Multi-device session tracking β€” see every device you're logged in on and revoke any of them.

4️⃣ Admin Panel πŸ› οΈ

βœ… AdminLTE 3 dashboard with live stats (subjects, total questions, participants). βœ… Create, edit, and delete subjects and every question type. βœ… Review quiz results per subject, with participant name and score.

πŸ“Έ Screenshots

Login Login Page

Taking a Quiz Quiz Page

Admin Dashboard Admin Dashboard

πŸ›  Demo Account

πŸ‘€ Username πŸ”‘ Password
iqbolshoh Iqbolshoh$7

πŸ“‚ Project Structure

php-test-platform/
β”œβ”€β”€ login/, signup/, logout/    # Auth pages (signup/check_availability.php backs live validation)
β”œβ”€β”€ user/                       # Admin panel (AdminLTE) β€” protected by auth.php
β”‚   β”œβ”€β”€ topics.php               # Manage subjects (auto-generates the public URL slug)
β”‚   β”œβ”€β”€ test.php, true_false.php, dropdown.php,
β”‚   β”‚   fill_in_the_blank.php, matching.php   # One CRUD page per question format
β”‚   β”œβ”€β”€ results.php              # Per-subject quiz results
β”‚   β”œβ”€β”€ active_sessions.php      # Multi-device session management
β”‚   └── includes/                # Shared navbar, footer, css/js includes for the admin panel
β”œβ”€β”€ src/css/, src/js/, src/images/
β”œβ”€β”€ config.php                   # DB connection + tiny query-builder helper class
β”œβ”€β”€ database.sql                 # Schema + demo data (5 subjects, 25 questions, demo user)
β”œβ”€β”€ header.php, footer.php       # Public site layout
β”œβ”€β”€ index.php                    # Public homepage
└── test.php                     # Public quiz-taking page (/test.php?url=<slug>)

πŸ“‹ Requirements

  • PHP 7.4+ (with the mysqli extension enabled)
  • MySQL / MariaDB
  • Apache or Nginx (or PHP's built-in server for local testing)

βš™οΈ Installation Guide

1️⃣ Clone the repository

git clone https://github.com/Iqbolshoh/php-test-platform.git
cd php-test-platform

2️⃣ Import the database

database.sql creates the test_platform database, all tables, and seed data in one go:

mysql -u yourusername -p < database.sql

3️⃣ Configure the database connection

Open config.php and update the credentials if they differ from the defaults:

define("DB_SERVER", "localhost");
define("DB_USERNAME", "root");
define("DB_PASSWORD", "");
define("DB_NAME", "test_platform");

4️⃣ Run the application

php -S localhost:8000

Then open http://localhost:8000 in your browser (or deploy to Apache/Nginx as usual).

πŸ–₯ Technologies Used

HTML CSS Bootstrap JavaScript jQuery AdminLTE PHP MySQL

πŸ“œ License

This project is open-source and available under the MIT License.

🀝 Contributing

🎯 Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.

πŸ“¬ Connect with Me

πŸ’¬ I love meeting new people and discussing tech, business, and creative ideas. Let's connect! You can reach me on these platforms:

Website Gmail GitHub LinkedIn Telegram Instagram X

About

No description or website provided.

Topics

Resources

License

Stars

8 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors