formInscription.php 1.71 KB
<?php
if(getGroupe($_SESSION['Login'])!=1)
{ header("Location: accueil.php"); }
$groupes = getGroupes();
?>
<div class="row">
	<div class="col-4 col-md-4 offset-md-4 offset-4">
	<br/>
		<h1 style="margin-bottom:20px; margin-top:60px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-user-circle"></i> Inscription</h1>
		<form action="inscription.php" method="post">
			<table class="table table-striped table-bordered">
				<tbody>
					<tr>
						<td>Nom : </td>
						<td><input type="text" name="nom" placeholder="Entrez votre nom" required="true" /></td>
					</tr>
					
					<tr>
						<td>Prénom : </td>
						<td><input type="text" name="prenom" placeholder="Entrez votre prénom" required="true" /></td>
					</tr>

					<tr>
						<td>Groupe : </td>
						<td>
							<select id="groupe" name="groupe" required />
								<option> </option>
								<?php
								foreach($groupes as $groupe)
								{
									echo "<option value=$groupe['id']>$groupe['nom']</option>";
								}
								?>
							</select>
						</td>
					</tr>

					<tr>
						<td>Identifiant : </td>
						<td><input type="text" name="id" placeholder="Entrez votre identifiant" maxlength="30" required="true" /></td>
					</tr>
					
					<tr>
						<td>Mot de passe :</td>
						<td><input type="password" name="pass1" placeholder="Entrez votre mot de passe" required="true" /></td>
					</tr>
					<tr>
						<td>Confirmer mot de passe :</td>
						<td><input type="password" name="pass2" placeholder="Entrez votre mot de passe" required="true" /></td>
					</tr>
				</tbody>
			</table>
			<input type="submit" class="btn btn-dark btn-lg btn-block" style="margin-top:20px; margin-bottom:20px;" value="S'inscrire"/>
			<br/>
		</form>
	</div>
</div>