2025-12-20 15:34:12 +07:00

944 B

Database Setup (MySQL/XAMPP)

This project has been upgraded to use MySQL for shared global leaderboards and user accounts.

Requirements

  • XAMPP (or any WAMP/MAMP stack)
  • PHP 7.4 or higher
  • MySQL / MariaDB

Setup Instructions

  1. Start XAMPP: Open XAMPP Control Panel and start Apache and MySQL.
  2. Move Project: Ensure the project folder is inside C:\xampp\htdocs\.
  3. Configure Database:
    • Go to http://localhost/phpmyadmin
    • Create a new database named space_odyssey.
  4. Access Game:
    • Open your browser to http://localhost/Kelompok09-SPOILER/Main.html.

Structure

  • /database/db_connect.php: MySQL connection script (configured for default XAMPP).
  • /api/: Contains the PHP endpoints for the game.

Troubleshooting

If you see "Database connection failed", ensure:

  1. MySQL is running in XAMPP.
  2. The database name in db_connect.php matches your phpMyAdmin database name.