finalizzazione del progetto

This commit is contained in:
2026-04-10 05:16:11 +02:00
parent 00e81f9da4
commit ba1717cbb6
24 changed files with 1650 additions and 389 deletions
+7 -32
View File
@@ -1,35 +1,10 @@
<?php
$debug = false;
function setDebug($val) {
$debug = $val;
if ($debug) {
echo "db";
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "save-the-island";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
}
$db_test = [
[
'nome' => 's1',
'p1' => 95,
'p2' => 90,
'pt' => 50,
'g' => '24-11-2025'
],
[
'nome' => 's1',
'p1' => 95,
'p2' => 90,
'pt' => 50,
'g' => '24-11-2025'
]
];
$classifica = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
function riga($pos, $data) {
$pos++;
$nome = $data['nome'];
$p1 = $data['p1'];
$p2 = $data['p2'];
$pt = $data['pt'];
$g = $data['g'];
echo '<tr><td>'.$pos.'</td><td>'.$nome.'</td><td>'.$p1.'</td><td>'.$p2.'</td><td>'.$pt.'</td><td>'.$g.'</td></tr>';
}
?>