Hi Sirs,
I do write these codes to redirect to another page ONLY when the point's score is fully 10 for example ($row["total_score"]).
Before to be redirected... just wait certain time (for instance, 5 seconds). After this specific time the page can be redirected. If not the page cannot be redirected to another page. Thank you !
<?php
$sql = "SELECT SUM(score) AS total_score FROM champion_response_IA WHERE question='1'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
echo "<br>";
echo "<div style='text-align:center;'><style='background-color: black;color:white'><font size=6pt;>Total : " . $row["total_score"] . " Point(s)</font><br>";
} else {
echo "No results found.";
}
$conn->close();
?>
<?php
{
echo "<tr>";
echo "</tr>";
}
echo "<br><br>";
echo"<br>";
echo"<center><button class=print_page name=print_page id=print_page onClick=window.print()> Partager ou Imprimer </button></center>";
echo"<br>";
echo"<br><br>";
?>