forked from ghouar-t/SaeDEV2.2
travail en colab avec alexis et nicolas sur un partage
This commit is contained in:
parent
a6f0b4d1ad
commit
c7ce5dd3ac
@ -1,4 +1,9 @@
|
|||||||
/*Pour toutes les pages : */
|
/*Pour toutes les pages : */
|
||||||
|
@font-face {
|
||||||
|
font-family: "RobotoFlex";
|
||||||
|
src: url(/assets/RobotoFlex.ttf);
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -8,11 +13,26 @@
|
|||||||
body {
|
body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: auto; /* Utilisez 100vh pour une hauteur complète de la fenêtre */
|
min-height: 100dvh; /* Utilisez 100vh pour une hauteur complète de la fenêtre */
|
||||||
background-image: url(../img/jo20244.jpeg);
|
background-image: url(../img/jo20244.jpeg);
|
||||||
|
background-size: cover;
|
||||||
|
overflow-x: hidden;
|
||||||
|
background-attachment: fixed;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
font-family: "RobotoFlex";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body::before{
|
||||||
|
content: "";
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
z-index: -1;}
|
||||||
|
|
||||||
#content.index {
|
#content.index {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@ -39,7 +59,6 @@
|
|||||||
background-image: url(../img/ouiouibaguette.jpg);
|
background-image: url(../img/ouiouibaguette.jpg);
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
/*background-color: #000000e2;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.categorie{
|
a.categorie{
|
||||||
@ -90,11 +109,12 @@
|
|||||||
|
|
||||||
div.error-message {
|
div.error-message {
|
||||||
color: red;
|
color: red;
|
||||||
|
font-size: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connexion {
|
.connexion {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
height: 400px;
|
height: 420px;
|
||||||
margin: 100px auto ; /* Augmenter la marge en haut à 100px */
|
margin: 100px auto ; /* Augmenter la marge en haut à 100px */
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
background-color: #d4d4d4;
|
background-color: #d4d4d4;
|
||||||
@ -106,7 +126,7 @@
|
|||||||
|
|
||||||
.inscription {
|
.inscription {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
height: 580px;
|
height: 900px;
|
||||||
margin: 100px auto ; /* Augmenter la marge en haut à 100px */
|
margin: 100px auto ; /* Augmenter la marge en haut à 100px */
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
background-color: #d4d4d4;
|
background-color: #d4d4d4;
|
||||||
@ -126,12 +146,17 @@
|
|||||||
|
|
||||||
.submit {
|
.submit {
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
|
border-radius: 30px;
|
||||||
|
background-color: #0059ffe2;
|
||||||
|
border: none;
|
||||||
|
padding: 10px;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
/* profil*/
|
/* profil*/
|
||||||
|
|
||||||
.page_profil {
|
.page_profil {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
height: 400px;
|
height: 900px;
|
||||||
margin: 100px auto ; /* Augmenter la marge en haut à 100px */
|
margin: 100px auto ; /* Augmenter la marge en haut à 100px */
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
background-color: #d4d4d4;
|
background-color: #d4d4d4;
|
||||||
@ -144,3 +169,19 @@
|
|||||||
img.profil {
|
img.profil {
|
||||||
max-width : 15%;
|
max-width : 15%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* evenement.php*/
|
||||||
|
|
||||||
|
.ListeEvenement {
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
margin: 100px auto ; /* Augmenter la marge en haut à 100px */
|
||||||
|
padding: 40px;
|
||||||
|
background-color: #d4d4d4;
|
||||||
|
border: none;
|
||||||
|
border-radius: 50px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 140%;
|
||||||
|
}
|
||||||
|
|
||||||
|
BIN
img/essai.jpg
BIN
img/essai.jpg
Binary file not shown.
Before Width: | Height: | Size: 431 KiB |
BIN
img/icon.png
BIN
img/icon.png
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
BIN
img/jo20244.jpg
BIN
img/jo20244.jpg
Binary file not shown.
Before Width: | Height: | Size: 378 KiB |
14
index.php
14
index.php
@ -18,10 +18,18 @@ session_start();
|
|||||||
<header>
|
<header>
|
||||||
<?php
|
<?php
|
||||||
if (isset($_SESSION['login'])) {
|
if (isset($_SESSION['login'])) {
|
||||||
echo "<h1 class='Hello'>Bienvenue ". $_SESSION['login']." sur le site des JO !</h1>";
|
if ($_SESSION['genre']=='homme') {
|
||||||
|
echo "<h1 class='Hello'>Bienvenue Mr ". $_SESSION['nom']." ".$_SESSION['prenom']." sur le site des JO !</h1>";
|
||||||
|
}
|
||||||
|
if ($_SESSION['genre']=='femme') {
|
||||||
|
echo "<h1 class='Hello'>Bienvenue Mme ". $_SESSION['nom']." ".$_SESSION['prenom']." sur le site des JO !</h1>";
|
||||||
|
}
|
||||||
|
if($_SESSION['genre']=='autre') {
|
||||||
|
echo "<h1 class='Hello'>Bienvenue ". $_SESSION['nom']." ".$_SESSION['prenom']." sur le site des JO !</h1>";
|
||||||
|
}
|
||||||
echo "<nav>";
|
echo "<nav>";
|
||||||
|
|
||||||
echo "<a href='html/events.html' class='categorie'>Évènements</a>";
|
echo "<a href='php/evenement.php' class='categorie'>Évènements</a>";
|
||||||
echo "<a href='php/profil.php'><img class='profil' src='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/img/photo-profil.png' alt='profil'></a>";
|
echo "<a href='php/profil.php'><img class='profil' src='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/img/photo-profil.png' alt='profil'></a>";
|
||||||
echo "<a href='php/deconnexion.php' class='categorie'>Déconnexion</a>";
|
echo "<a href='php/deconnexion.php' class='categorie'>Déconnexion</a>";
|
||||||
echo "</nav>";
|
echo "</nav>";
|
||||||
@ -30,7 +38,7 @@ session_start();
|
|||||||
echo "<h1 class='Hello'>Bienvenue sur le site des JO ! </h1>";
|
echo "<h1 class='Hello'>Bienvenue sur le site des JO ! </h1>";
|
||||||
echo "<nav>";
|
echo "<nav>";
|
||||||
|
|
||||||
echo "<a href='html/events.html' class='categorie'>Évènements</a>";
|
echo "<a href='php/evenement.php' class='categorie'>Évènements</a>";
|
||||||
echo "<a href='php/connexion.php' class='categorie'>Connexion</a>";
|
echo "<a href='php/connexion.php' class='categorie'>Connexion</a>";
|
||||||
echo "<a href='php/inscription.php' class='categorie'>Inscription</a>";
|
echo "<a href='php/inscription.php' class='categorie'>Inscription</a>";
|
||||||
echo "</nav>";
|
echo "</nav>";
|
||||||
|
@ -28,12 +28,18 @@ if (!empty($_POST['login']) && !empty($_POST['password'])) {
|
|||||||
$row = mysqli_fetch_assoc($result);
|
$row = mysqli_fetch_assoc($result);
|
||||||
$hash = $row['mdp'];
|
$hash = $row['mdp'];
|
||||||
$mail = $row['mail'];
|
$mail = $row['mail'];
|
||||||
|
$nom = $row['nom'];
|
||||||
|
$prenom = $row['prenom'];
|
||||||
|
$genre = $row['genre'];
|
||||||
$role = $row ['Role'];
|
$role = $row ['Role'];
|
||||||
|
|
||||||
if (password_verify($password, $hash)) {
|
if (password_verify($password, $hash)) {
|
||||||
if ($login) {
|
if ($login) {
|
||||||
$_SESSION['login'] = $login;
|
$_SESSION['login'] = $login;
|
||||||
$_SESSION['mail'] = $mail;
|
$_SESSION['mail'] = $mail;
|
||||||
|
$_SESSION['nom'] = $nom;
|
||||||
|
$_SESSION['prenom'] = $prenom;
|
||||||
|
$_SESSION['genre'] = $genre;
|
||||||
$_SESSION['role'] = $role;
|
$_SESSION['role'] = $role;
|
||||||
|
|
||||||
header('Location: ../index.php');
|
header('Location: ../index.php');
|
||||||
@ -42,10 +48,10 @@ if (!empty($_POST['login']) && !empty($_POST['password'])) {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$error_verif2 = "mauvais mot de passe";
|
$error_verif2 = "Mot de passe incorrect";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$error_verif = "ce login n'existe pas";
|
$error_verif = "Ce login n'existe pas";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,7 +68,7 @@ if (!empty($_POST['login']) && !empty($_POST['password'])) {
|
|||||||
<header>
|
<header>
|
||||||
<h1 class='Hello'> Page de connexion </h1>
|
<h1 class='Hello'> Page de connexion </h1>
|
||||||
<nav>
|
<nav>
|
||||||
<a href="../index.php" class="categorie">Page d'accueil</a>
|
<a href="../" class="categorie">Page d'accueil</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
75
php/evenement.php
Normal file
75
php/evenement.php
Normal file
File diff suppressed because one or more lines are too long
@ -13,17 +13,29 @@
|
|||||||
// Informations de connexion à la base de données
|
// Informations de connexion à la base de données
|
||||||
require_once 'common.php';
|
require_once 'common.php';
|
||||||
session_start();
|
session_start();
|
||||||
|
$db = initDatabase();
|
||||||
|
$vide = mysqli_query($db,"SELECT * FROM user");
|
||||||
|
if (mysqli_num_rows($vide)==0) {
|
||||||
|
$hello=password_hash('hello', PASSWORD_DEFAULT);
|
||||||
|
|
||||||
|
mysqli_query($db,"INSERT INTO user VALUES ('toto','toto@gmail.com','Dufour','Michel','homme','$hello','athlete')");
|
||||||
|
mysqli_query($db,"INSERT INTO user VALUES ('commun','commun@gmail.com','Hello','World','autre','$hello','organizer')");
|
||||||
|
mysqli_query($db,"INSERT INTO user VALUES ('Marie','Marie@gmail.com','Monro','Mariline','femme','$hello','spectator')");
|
||||||
|
}
|
||||||
if (!empty($_REQUEST['login']) && !empty($_REQUEST['password'])) {
|
if (!empty($_REQUEST['login']) && !empty($_REQUEST['password'])) {
|
||||||
$db = initDatabase();
|
|
||||||
$login = $_POST['login'];
|
$login = $_POST['login'];
|
||||||
$password = $_POST['password'];
|
$password = $_POST['password'];
|
||||||
$role = $_POST['role'];
|
$role = $_POST['role'];
|
||||||
$mail = $_POST['mail'];
|
$mail = $_POST['mail'];
|
||||||
|
$nom = $_POST['nom'];
|
||||||
|
$prenom = $_POST['prenom'];
|
||||||
|
$genre = $_POST['genre'];
|
||||||
$password_hash = password_hash($password, PASSWORD_DEFAULT);
|
$password_hash = password_hash($password, PASSWORD_DEFAULT);
|
||||||
|
|
||||||
$verif=mysqli_query($db,"SELECT * FROM user WHERE login = '$login' ");
|
$verif=mysqli_query($db,"SELECT * FROM user WHERE login = '$login' ");
|
||||||
$verif2=mysqli_query($db,"SELECT * FROM user WHERE mail = '$mail' ");
|
$verif2=mysqli_query($db,"SELECT * FROM user WHERE mail = '$mail' ");
|
||||||
$result="INSERT INTO user VALUES('$login','$mail','$password_hash','$role')";
|
$result="INSERT INTO user VALUES('$login','$mail','$nom','$prenom','$genre','$password_hash','$role')";
|
||||||
|
|
||||||
if (mysqli_num_rows($verif) == 0) {
|
if (mysqli_num_rows($verif) == 0) {
|
||||||
if (mysqli_num_rows($verif2) == 0) {
|
if (mysqli_num_rows($verif2) == 0) {
|
||||||
@ -37,11 +49,11 @@ if (!empty($_REQUEST['login']) && !empty($_REQUEST['password'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$error_verif2 = "cette adresse mail est déjà utilisé";
|
$error_verif2 = "Cette adresse mail est déjà utilisé";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$error_verif = "ce login est déjà utilisé";
|
$error_verif = "Ce login est déjà utilisé";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -59,7 +71,7 @@ if (!empty($_REQUEST['login']) && !empty($_REQUEST['password'])) {
|
|||||||
<header>
|
<header>
|
||||||
<h1 class='Hello'> Page d'inscription </h1>
|
<h1 class='Hello'> Page d'inscription </h1>
|
||||||
<nav>
|
<nav>
|
||||||
<a href="../index.php" class="categorie">Page d'accueil</a>
|
<a href="../" class="categorie">Page d'accueil</a>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
@ -71,14 +83,29 @@ if (!empty($_REQUEST['login']) && !empty($_REQUEST['password'])) {
|
|||||||
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<label for="login">Login :</label><br>
|
<label for="login">Login :</label><br>
|
||||||
<input type="text" id="login" name="login" value="<?php if (isset($_REQUEST['login'])) { echo $_REQUEST['login']; } ?>" ><br>
|
<input type="text" id="login" name="login" required ><br>
|
||||||
<?php if (isset($error_verif)) {echo "<div class='error-message'>$error_verif</div>";} ?>
|
<?php if (isset($error_verif)) {echo "<div class='error-message'>$error_verif</div>";} ?>
|
||||||
<br><br><label for="mail">Adresse mail :</label><br>
|
<br><br><label for="mail">Adresse mail :</label><br>
|
||||||
<input type="email" id="mail" name="mail" placeholder="username@example.com" value="<?php if (isset($_REQUEST['mail'])) { echo $_REQUEST['mail']; } ?>" required><br>
|
<input type="email" id="mail" name="mail" placeholder="username@example.com" required><br>
|
||||||
<?php if (isset($error_verif2)) {echo "<div class='error-message'>$error_verif2</div>";} ?>
|
<?php if (isset($error_verif2)) {echo "<div class='error-message'>$error_verif2</div>";} ?>
|
||||||
|
|
||||||
|
<br><br><label for="nom">Nom :</label><br>
|
||||||
|
<input type="text" id="nom" name="nom" required><br>
|
||||||
|
|
||||||
|
<br><br><label for="prenom">Prenom :</label><br>
|
||||||
|
<input type="text" id="prenom" name="prenom" required><br>
|
||||||
|
|
||||||
|
<br><br> <label for ="genre"> Genre: </label> <br>
|
||||||
|
<select id="genre" name="genre" required>
|
||||||
|
<option value="">-- Please choose an option --</option>
|
||||||
|
<option value="homme">Homme</option>
|
||||||
|
<option value="femme">Femme</option>
|
||||||
|
<option value="autre">Autre</option>
|
||||||
|
</select><br>
|
||||||
|
|
||||||
|
|
||||||
<br><br><label for="password">Mot de passe :</label><br>
|
<br><br><label for="password">Mot de passe :</label><br>
|
||||||
<input type="password" id="password" name="password" placeholder="••••••••" value="<?php if (isset($_REQUEST['password'])) { echo $_REQUEST['password']; } ?>" required><br>
|
<input type="password" id="password" name="password" placeholder="••••••••" required><br>
|
||||||
|
|
||||||
|
|
||||||
<br><br><label for="role">Role :</label><br>
|
<br><br><label for="role">Role :</label><br>
|
||||||
|
132
php/profil.php
132
php/profil.php
@ -4,48 +4,65 @@ session_start();
|
|||||||
|
|
||||||
$login = $_SESSION['login'];
|
$login = $_SESSION['login'];
|
||||||
$mail = $_SESSION['mail'];
|
$mail = $_SESSION['mail'];
|
||||||
|
$nom = $_SESSION['nom'];
|
||||||
|
$prenom = $_SESSION['prenom'];
|
||||||
|
$genre = $_SESSION['genre'];
|
||||||
$role = $_SESSION['role'];
|
$role = $_SESSION['role'];
|
||||||
|
|
||||||
if (!empty($_POST['login']) && !empty($_POST['mail'])) {
|
if (!empty($_POST['nom']) && !empty($_POST['mail']) && !empty($_POST['prenom']) && !empty($_POST['genre'])) {
|
||||||
$db = initDatabase();
|
$db = initDatabase();
|
||||||
$login = $_POST['login'];
|
|
||||||
$mail = $_POST['mail'];
|
$mail = $_POST['mail'];
|
||||||
$role = $_POST['role'];
|
$nom = $_POST['nom'];
|
||||||
$originallogin = $_SESSION['login'];
|
$prenom = $_POST['prenom'];
|
||||||
|
$genre = $_POST['genre'];
|
||||||
|
|
||||||
$originalmail = $_SESSION['mail'];
|
$originalmail = $_SESSION['mail'];
|
||||||
|
|
||||||
|
if ($mail != $originalmail) {
|
||||||
$verif=mysqli_query($db,"SELECT * FROM user WHERE login = '$login' ");
|
$verif=mysqli_query($db,"SELECT * FROM user WHERE mail = '$mail' ");
|
||||||
$verif2=mysqli_query($db,"SELECT * FROM user WHERE mail = '$mail' ");
|
if (mysqli_num_rows($verif) == 0) {
|
||||||
$result = "UPDATE user SET login='$login', mail='$mail',Role='$role' WHERE login = '$originallogin' AND mail = '$originalmail'";
|
$bool=true;
|
||||||
|
|
||||||
//if (mysqli_num_rows($verif) == 0) {
|
|
||||||
//if (mysqli_num_rows($verif2) == 0) {
|
|
||||||
if (mysqli_query($db,$result)) {
|
|
||||||
|
|
||||||
$_SESSION['login']=$login;
|
|
||||||
$_SESSION['role']=$role;
|
|
||||||
$_SESSION['mail']=$mail;
|
|
||||||
header('Location: ../index.php');
|
|
||||||
exit();
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
die("erreur");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//else {
|
else {
|
||||||
//$error_verif2 = "cette adresse mail est déjà utilisé";
|
$bool=false;
|
||||||
//}
|
}
|
||||||
//}
|
}
|
||||||
//else {
|
else {
|
||||||
//$error_verif = "ce login est déjà utilisé";
|
$bool=true;
|
||||||
//}
|
}
|
||||||
//}
|
|
||||||
|
$result = "UPDATE user SET mail='$mail',nom='$nom', prenom='$prenom', genre='$genre' WHERE login = '$login' AND mail = '$originalmail'";
|
||||||
|
|
||||||
|
if ($bool==true) {
|
||||||
|
if (mysqli_query($db,$result)) {
|
||||||
|
|
||||||
|
$_SESSION['login'] = $login;
|
||||||
|
$_SESSION['mail'] = $mail;
|
||||||
|
$_SESSION['nom'] = $nom;
|
||||||
|
$_SESSION['prenom'] = $prenom;
|
||||||
|
$_SESSION['genre'] = $genre;
|
||||||
|
$_SESSION['role'] = $role;
|
||||||
|
header('Location: ../index.php');
|
||||||
|
exit();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
die("erreur");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$error_verif = "cette adresse mail est déjà utilisé";
|
||||||
|
$mail=$originalmail;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<script language="javascript" src="JavaScript/déconnexion.js"></script>
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="icon" href="../img/jo2024.jpg" >
|
<link rel="icon" href="../img/jo2024.jpg" >
|
||||||
<link rel="stylesheet" href="../css/style.css">
|
<link rel="stylesheet" href="../css/style.css">
|
||||||
@ -59,8 +76,8 @@ if (!empty($_POST['login']) && !empty($_POST['mail'])) {
|
|||||||
|
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<a href="../index.php" class="categorie">Page d'accueil</a>
|
<a href="../" class="categorie">Page d'accueil</a>
|
||||||
<a href='events.php' class='categorie'>Évènements</a>
|
<a href='evenement.php' class='categorie'>Évènements</a>
|
||||||
<a href='deconnexion.php' class='categorie'>Déconnexion</a>
|
<a href='deconnexion.php' class='categorie'>Déconnexion</a>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
@ -73,30 +90,43 @@ if (!empty($_POST['login']) && !empty($_POST['mail'])) {
|
|||||||
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<br><label for="login">Login :</label><br>
|
<br><label for="login">Login :</label><br>
|
||||||
<input type="text" id="login" name="login" required value="<?php if (isset($login)) {echo $login;} ?>"><br>
|
<?php
|
||||||
<br><label for="password">Adresse mail :</label><br>
|
echo $login;
|
||||||
|
?>
|
||||||
|
<br><br><label for="mail">Adresse mail :</label><br>
|
||||||
<input type="email" id="mail" name="mail" value="<?php if (isset($mail)) {echo $mail;} ?>"><br>
|
<input type="email" id="mail" name="mail" value="<?php if (isset($mail)) {echo $mail;} ?>"><br>
|
||||||
|
<?php if (isset($error_verif)) {echo "<div class='error-message'>$error_verif</div>";} ?>
|
||||||
<br><label for="role">Role :</label><br>
|
<br><label for="nom">Nom :</label><br>
|
||||||
<select id="role" name="role" value="<?php $role; ?>" required>
|
<input type="text" id="nom" name="nom" required value="<?php if (isset($nom)) {echo $nom;} ?>"><br>
|
||||||
|
<br><label for="prenom">Prenom :</label><br>
|
||||||
|
<input type="text" id="prenom" name="prenom" value="<?php if (isset($prenom)) {echo $prenom;} ?>"><br>
|
||||||
|
<br><label for="genre">Genre :</label><br>
|
||||||
|
<select id="genre" name="genre" value="<?php $genre; ?>" required>
|
||||||
<?php
|
<?php
|
||||||
if ($role=="spectator") {
|
if ($genre=="homme") {
|
||||||
echo "<option value='spectator' selected>Spectator</option>";
|
echo "<option value='homme' selected>Homme</option>";
|
||||||
echo "<option value='athlete'>Athlete</option>";
|
echo "<option value='femme'>Femme</option>";
|
||||||
echo "<option value='organizer'>Organizer</option>";
|
echo "<option value='autre'>Autre</option>";
|
||||||
}
|
}
|
||||||
if ($role=="athlete") {
|
if ($genre=="femme") {
|
||||||
echo "<option value='spectator'>Spectator</option>";
|
echo "<option value='homme'>Homme</option>";
|
||||||
echo "<option value='athlete' selected>Athlete</option>";
|
echo "<option value='femme' selected>Femme</option>";
|
||||||
echo "<option value='organizer'>Organizer</option>";
|
echo "<option value='autre'>Autre</option>";
|
||||||
}
|
}
|
||||||
if ($role=="organizer") {
|
if ($genre=="autre") {
|
||||||
echo "<option value='spectator'>Spectator</option>";
|
echo "<option value='homme'>Homme</option>";
|
||||||
echo "<option value='athlete'>Athlete</option>";
|
echo "<option value='femme'>Femme</option>";
|
||||||
echo "<option value='organizer' selected>Organizer</option>";
|
echo "<option value='autre' selected>Autre</option>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select><br><br>
|
</select><br><br>
|
||||||
|
|
||||||
|
|
||||||
|
<label for="role">Role :</label><br>
|
||||||
|
<?php
|
||||||
|
echo $role;
|
||||||
|
?>
|
||||||
|
</select><br><br>
|
||||||
<br><button type="submit" class="submit">Modifier les informations personnelles </button>
|
<br><button type="submit" class="submit">Modifier les informations personnelles </button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user