diff --git a/modif_profil.php b/modif_profil.php index 55c2a8713ecd86670e989bf1f2a200cc9c67c5f9..18be202eff2b2a2caeff4542d533e2b64b169266 100644 --- a/modif_profil.php +++ b/modif_profil.php @@ -1,69 +1,67 @@ <?php -session_start(); -$_SESSION['pseudo']; -$_SESSION['estco']; -if($_SESSION['estco']==NULL){ - header('Location: insco.php'); -} + session_start(); + $_SESSION['pseudo']; + $_SESSION['estco']; + if($_SESSION['estco']==NULL){ + header('Location: insco.php'); +} include("config.php"); ?> - - <!DOCTYPE html> <html> -<head> - <link rel="stylesheet" href="index.css" type="text/css"> + <head> + <link rel="stylesheet" href="index.css" type="text/css"> <meta charset="UTF-8"> <title> Modification du profil </title> -</head> -<body id="accueil"> -<header> - <!--<h1> GN Space Wanderlust /!\ En construction /!\</h1>--> - <img src="images/banniere.jpg" alt="étendard" id="banniere"> - <nav> - <a href="index.php"> Home </a> - <a href="Event.php"> Evènements </a> - <a href="profil.php"> Profil </a> - <?php - if ($_SESSION['estco'] != true) - echo"<a href=\"insco.php\"> Inscription/connexion</a>"; - else - echo "<a href=\"destructeur.php\"> Déconnexion </a>"; - ?> - <?php - if (isset($_SESSION['admin'])) - echo "<a href=\"Action_admin/page_creator.php\">Création d'évenement</a>"; - ?> - <a href="http://www.facebook.com/GN-Space-Wanderlust-959928607460991"><img src="images/logo_fb.jpg" alt="Facebook du GN" class="logo"></a> - <a href="contact.php"> Contact </a> - </nav> -</header> -<section id="bgc_accueil"> - <article id="color_font_accueil"> - <form action="traitement_modif.php" method="post"> - <?php - $requete="SELECT mdp,pseudo,email FROM Inscrit_site WHERE pseudo = '".$_SESSION['pseudo']."';"; - $connexion=pg_connect("host=localhost dbname=gn password=$passbd user=$userbd"); - $reponse=pg_query($connexion,$requete); - $connecte=pg_fetch_assoc($reponse); - - echo "Pseudo :" .$connecte['pseudo']; - ?> - <p>Mot de passe<p> - <p><input type="password" size="20" maxlength="18" name="pass" /></p> - <p>Confirmation de mot de passe</p> - <p><input type="password" size="20" maxlength="18" name="confpass" /></p> - <p>Email</p> - <p><input type="text" size="20" maxlength="18" name="mail" value= '<?php echo $connecte['email'] ;?>'/></p> - <p>Confirmation Email</p> - <p><input type="text" size="20" maxlength="18" name="confmail" value='<?php echo $connecte['email'] ;?>'/></p> - <!--<p><input type="text" size="20" maxlength="18" name="nom"/></p> - <p><input type="text" size="20" maxlength="18" name="prenom"/></p> - <p><input type="text" size="20" maxlength="18" name="adresse"/></p> - <p><input type="text" size="20" maxlength="18" name="telephone"/></p>--> - <p><input type="submit" value="Valider" name="subbutton_modif"/></p> - </form> -</section> -</article> -</body> + </head> + <body id="accueil"> + <header> + <!--<h1> GN Space Wanderlust /!\ En construction /!\</h1>--> + <img src="images/banniere.jpg" alt="étendard" id="banniere"> + <nav> + <a href="index.php"> Home </a> + <a href="Event.php"> Evènements </a> + <a href="profil.php"> Profil </a> + <?php + if ($_SESSION['estco'] != true) + echo"<a href=\"insco.php\"> Inscription/connexion</a>"; + else + echo "<a href=\"destructeur.php\"> Déconnexion </a>"; + ?> + <?php + if (isset($_SESSION['admin'])) + echo "<a href=\"Action_admin/page_creator.php\">Création d'évenement</a>"; + ?> + <a href="http://www.facebook.com/GN-Space-Wanderlust-959928607460991"><img src="images/logo_fb.jpg" alt="Facebook du GN" class="logo"></a> + <a href="contact.php"> Contact </a> + </nav> + </header> + <section id="bgc_accueil"> + <article id="color_font_accueil"> + <form action="traitement_modif.php" method="post"> + <?php + $requete="SELECT mdp,pseudo,email FROM Inscrit_site WHERE pseudo = '".$_SESSION['pseudo']."';"; + $connexion=pg_connect("host=localhost dbname=gn password=$passbd user=$userbd"); + $reponse=pg_query($connexion,$requete); + $connecte=pg_fetch_assoc($reponse); + + echo "Pseudo :" .$connecte['pseudo']; + ?> + <p>Mot de passe<p> + <p><input type="password" size="20" maxlength="18" name="pass" /></p> + <p>Confirmation de mot de passe</p> + <p><input type="password" size="20" maxlength="18" name="confpass" /></p> + <p>Email</p> + <p><input type="text" size="20" maxlength="320" name="mail" value= '<?php echo $connecte['email'] ;?>'/></p> + <p>Confirmation Email</p> + <p><input type="text" size="20" maxlength="320" name="confmail" value='<?php echo $connecte['email'] ;?>'/></p> + <!--<p><input type="text" size="20" maxlength="18" name="nom"/></p> + <p><input type="text" size="20" maxlength="18" name="prenom"/></p> + <p><input type="text" size="20" maxlength="18" name="adresse"/></p> + <p><input type="text" size="20" maxlength="18" name="telephone"/></p>--> + <p><input type="submit" value="Valider" name="subbutton_modif"/></p> + </form> + </section> + </article> + </body> </html>