2025-12-01 02:47:37 -05:00

30 lines
800 B
PHP

<!---------------------------------- index.php ---------------------------------->
<?php
session_start();
$conn = new mysqli("localhost","root","","breakout_db");
if($conn->connect_error){ die("DB Error"); }
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Breakout Game</h1>
<div class="menu">
<a href="login.php">Login / Register</a>
<a href="leaderboard.php">Leaderboard</a>
</div>
<canvas id="game" width="480" height="320"></canvas>
<p>Score: <span id="score">0</span></p>
<p>
<select id="diff">
<option value="easy">Easy</option>
<option value="medium">Medium</option>
<option value="hard">Hard</option>
</select>
<button onclick="startGame()">Start</button>
</p>
<script src="script.js"></script>
</body>
</html>