-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinscription.php
81 lines (36 loc) · 1.34 KB
/
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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Inscription</title>
<link rel="stylesheet" href="styles/inscription.css">
<link rel="stylesheet" href="styles/styles.css">
<link rel="icon" href="ressources/menu/Notepad_Pencil_clip_art_hight.png">
</head>
<body>
<?php
include("php/sql.php");
ConnectDatabase();
$newAccountStatus = CheckNewAccountForm();
$loginStatus = CheckLogin();
//Si on est connecté redirection vers notre page de blog
if (isset($username) && strlen($_POST["name"]) > 3 && $_POST["password"] == $_POST["confirm"] && strlen($_POST["password"]) !=0 ) {
$query20 = "SELECT `ID` FROM `connexion` WHERE logname = '" . $username . "' ";
$result20 = $conn->query($query20);
$userID2 = $result20->fetch_assoc()["ID"];
echo '<script type="text/javascript">document.location.replace("./index.php?userID='.$userID2.'");</script>';
}
include 'php/menu.php';
//Sinon on s'inscrit
if($newAccountStatus[1]){
echo '<h3 class="centre">Nouveau compte crée avec succès !</h3>';
}
elseif ($newAccountStatus[0]){
echo '<h3 id="colorAnim" class="centre">'.$newAccountStatus[2].'</h3>';
}
include 'php/formulaire_inscription.php';
include 'php/footer.php';
DisconnectDatabase();
?>
</body>
<script type="text/javascript" src="./js/messageErreur.js"></script>