connecter.php 908 Bytes
<?php 
session_start();
require("accesBase.php") ;

if(verifPwd($_POST["id"], $_POST["pwd"]))
{
	$_SESSION['Login'] = $_POST['id'];
	$_SESSION['Password'] = $_POST['pwd'];
	$connect = true;
}
else
{
	$connect = false;
}
?>

<!DOCTYPE html>

<html>
	<head>
		<?php include("head.php"); ?>
	</head>

	<!-- Contenu du site -->
	<body>
		<?php include("header.php"); ?>

		<!-- Centre de la page -->

		<?php
		if($connect)
		{
			?><meta http-equiv="Refresh" content="0;url=accueil.php" /><?php
		}
		else
		{
		?>
		<div class="row">
			<div class="col-4 col-md-4 offset-4 offset-md-4">
				<br/>
				<div class="alert alert-danger" role="alert">
					Identifiant ou mot de passe incorrect !
				</div>
			</div>
		</div>
		<!-- <meta http-equiv="Refresh" content="5;url=accueil.php" /> -->
		<?php
			include("formConnexion.php");
		}
		?>
	</body>
</html>