-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsultation_eleve.php
33 lines (32 loc) · 1020 Bytes
/
consultation_eleve.php
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
<?php
// Connecter à la base de donnée
$dbhost = 'tuxa.sme.utc';
$dbuser = 'nf92a100';
$dbpass = '6eTmrRXg';
$dbname = 'nf92a100';
$connect = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname) or die('Error connecting to mysql');
date_default_timezone_set('Europe/Paris');
// Tableau de consultation d'élève
echo "<head>
<link rel='stylesheet' type='text/css' href='test____.css'>
<meta charset='utf-8'>
</head>
<table id='table'>
<tr>
<th>Index</th>
<th>Nom</th>
<th>Prénom</th>
<th>Consulter</th>
</tr>";
$result = mysqli_query($connect,"SELECT * FROM eleves");
while($row=mysqli_fetch_array($result,MYSQL_NUM)) {
echo "<tr><td></td>";
echo "<td>".$row[1]."</td>";
echo "<td>".$row[2]."</td>";
echo "<form method='POST' action='consulter_eleve.php'>";
echo "<td><input type='hidden' name ='ideleve' value='$row[0]'><input id='submit' type='submit' value='consulter'></td></form>";
echo"</tr>";
}
echo "</table>";
mysqli_close($connect);
?>