<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8"/>
		<title>Gestion des Points</title>
		<link rel="shortcut icon" type="image/x-icon" href="../mmd/favicon.ico"/>
		<link rel="stylesheet" href="../style.css">
		<link rel="stylesheet" href="style.css">
		<script type="text/javascript" src="jquery.js"></script>
	</head>

<?php

$id = $_GET['id'];

$db = mysql_connect('localhost', 'root', 'm148r43a9Y@%Z')  or die ('Erreur de connexion '.mysql_error());

mysql_select_db('smartpassTest2',$db) or die ('Erreur de selection '.mysql_error());

$sql = "SHOW TABLES FROM smartpassTest2";
$tables = mysql_query($sql);

echo "<h1>Fin de la suppression</h1>";	

while ($row = mysql_fetch_row($tables)) {
	if($row[0]!="Parcours"){		
		$sql = "DELETE FROM {$row[0]} WHERE id = {$id}";
		mysql_query($sql);
		echo "<p style='color:white;'>Les données de {$row[0]} ont été supprimées pour le points d'ID {$id}</p>";
	}
}

?>

	<a href="index.php"><div class="back_arrow"></div></a>
	<style type="text/css">
	.back_arrow {
		background: url('../mmd/return.svg') no-repeat center;
		cursor: pointer;
		position: absolute;
		top: 50px;
		left: 50px;
		width: 50px;
		height: 50px;
		opacity: 1;
	}

	.back_arrow:hover {
		opacity: 0.5;
	}
	</style>