-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_inscription.php
94 lines (89 loc) · 3.59 KB
/
add_inscription.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
include_once("connexionDB.php");
session_start();
try{
$liste_etudiants = $connexion->query("SELECT * FROM etudiant ");
$liste_filieres = $connexion->query("SELECT * FROM filiere ");
$liste_annees = $connexion->query("SELECT * FROM annee_academique ");
}
catch(Exception $e){
print_r($e);
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ajout d'une inscription</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default">
<?php include('navigation.php') ?>
</nav>
<div class="container">
<div style="text-align: right;">
<h5>Vous êtes connecté M/Mlle <?php echo $_SESSION['nom'].' '.$_SESSION['prenom']; ?></h5>
<a href="examen/deconnexion.php">
<button type="button" class="btn rounded-pill btn-info">Deconnectez-vous !</button>
</a>
</div>
<h2>Ajout d'une inscription</h2>
<a href="examen/inscriptions.php"><button type="button" class="btn rounded-pill btn-success">Retour</button></a>
<form class="form-horizontal" method="post" action="examen/add_inscription_db.php">
<div class=" form-group ">
<label class="control-label col-sm-2 " for="nom">Etudiant :</label>
<div class="col-sm-8 form-group ">
<select class="form-control" name="etudiant_id">
<?php
foreach( $liste_etudiants as $etudiant ) {
?>
<option value="<?php echo $etudiant['id']; ?>"><?php echo $etudiant['nom'].' '.$etudiant['prenom']; ?></option>
<?php
}
?>
</select>
</div>
</div>
<div class="form-group ">
<label class="control-label col-sm-2 " for="prenom">Filiere :</label>
<div class="col-sm-8 form-group ">
<select class="form-control" name="filiere_id">
<?php
foreach( $liste_filieres as $filiere ) {
?>
<option value="<?php echo $filiere['id']; ?>"><?php echo $filiere['libelle']; ?></option>
<?php
}
?>
</select>
</div>
</div>
<div class="form-group ">
<label class="control-label col-sm-2 " for="email">Année académique :</label>
<div class="col-sm-8 form-group ">
<select class="form-control" name="annee_id">
<?php
foreach( $liste_annees as $annee ) {
?>
<option value="<?php echo $annee['id']; ?>"><?php echo $annee['code']; ?></option>
<?php
}
?>
</select>
</div>
</div>
<div class="form-group button">
<div class="col-sm-offset-2 col-sm-10 ">
<button type="submit" name="ajouter" class="btn btn-primary">Ajouter</button>
</div>
</div>
</form>
</div>
</body>
</html>