-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcours2.php
More file actions
38 lines (36 loc) · 1019 Bytes
/
cours2.php
File metadata and controls
38 lines (36 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
require_once 'auth.php';
if (!is_connected()){
header("Location: connexion.php");
}
if (isset($_POST['deconnexion'])){
unset($_SESSION['connected']);
unset($_SESSION['id']);
header("Location: connexion.php");
}
if (isset($_COOKIE["cours2"])){
$cmptCours2 = $_COOKIE["cours2"]+1;
}
else {
$cmptCours2 = 1;
}
setcookie("cours2",strval($cmptCours2));
?>
<html>
<head>
<meta charset="UTF-8"/>
<title>Cours 2</title>
</head>
<body>
<?php echo "Bonjour " . $_SESSION["id"]. " !"; ?>
<form method="post" action="">
<br/>
<input type="submit" name="deconnexion" value="Deconnexion">
</form>
<a href="formation.php">< Formations</a><br/><br/>
Nombre de consultation de ce cours : <?=$cmptCours2 ?>
<h1>Cours 2</h1>
<h3>Description du cours</h3>
<p> Ceci est la description du cours 2</p>
</body>
</html>