-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidation_seance.php
More file actions
43 lines (38 loc) · 1.46 KB
/
validation_seance.php
File metadata and controls
43 lines (38 loc) · 1.46 KB
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
39
40
41
42
43
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<?php
date_default_timezone_set('Europe/Paris');
$date = date("Y-m-d");
$dbhost = 'tuxa.sme.utc';
$dbuser = 'nf92p003';
$dbpass = 'gK41aEr1RFds';
$dbname = 'nf92p003';
$connect = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die ('Error connecting to mysql');
//la ligne suivante permet d'éviter les problèmes d'accent entre la page ouèbe et le serveur mysql
mysqli_set_charset($connect, 'utf8');
$query = "SELECT idseance, DateSeance, nom FROM seances, themes WHERE DateSeance<='$date' AND seances.Idtheme=themes.idtheme";
$result = mysqli_query($connect, $query);
// echo"<h1>NOTATION</h1><br>";
echo "<form method='POST' action='valider_seance.php'>";
echo "<h1 align=center>Notation</h1>";
echo "<label for='menuChoixSeance'> Séance à noter: </label>";
echo "<br><br><select name='menuChoixSeance' size='4' required>";
while($row=mysqli_fetch_array($result))
{
echo "<option value='$row[0]'>";
echo $row[1]." (".$row[2].")";
echo "</option>";
}
echo "</select>";
echo "<br><br><input type='submit' value='Valider'>";
echo "</form>";
mysqli_close($connect);
?>
</body>
</html>