-
Notifications
You must be signed in to change notification settings - Fork 0
/
connexion.php
53 lines (50 loc) · 1.97 KB
/
connexion.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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<link rel="stylesheet" href="connexion.css">
<title>BeautyMix • Connexion</title>
</head>
<body>
<script>// Vérifier si le cookie "user_logged_in" est défini
if (document.cookie.indexOf('user_logged_in=true') !== -1) {
// Rediriger vers le compte si déjà connecté
if (document.cookie.indexOf('admin=true') !== -1) {
window.location.href = 'moncompteadmin.php';
}
else{
window.location.href = 'moncompte.php';
}
}
</script>
<section>
<div class="form-box">
<div class="form-value">
<h2>Connexion</h2>
<div id='erreur'></div>
<form id="form" action="connexionfct.php" method="post">
<div class="inputbox">
<ion-icon name="mail-outline"></ion-icon>
<input name="email" id="email" type="email" required>
<label for="">Adresse mail</label>
</div>
<div class="inputbox">
<ion-icon name="lock-closed-outline"></ion-icon>
<input name="password" id="password" type="password" required>
<label for="">Mot de passe</label>
</div>
<button type="submit">Se connecter</button>
</form>
<div class="register">
<p>Vous n'avez pas de compte? <a href="inscription.php">Créez-en un!</a></p>
</div>
</div>
</div>
</section>
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
<script src="connexion.js"></script>
</body>
</html>