Bonjour j'ai un petit problème dans mon script, c'est que qu'en je fais appel alors du test sa m'affiche une erreur: "Notice: Undefined index: profil in C:\wamp\www\test\espacemembre.php on line 43" alors que j'ai bien appeler les sessions en tout début du script comme ceci:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2Mon Profil: <?php echo htmlentities(trim($_SESSION['profil']));?>
et voici le reste du script:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 <?php session_start(); if (!isset($_SESSION['pseudo']) && !isset($_SESSION['profil'])) { header ('Location: index.php'); exit(); } ?>
Merci de bien vouloir m'aider.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <?php session_start(); if (!isset($_SESSION['pseudo']) && !isset($_SESSION['profil'])) { header ('Location: index.php'); exit(); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body id="page1"> <div id="main"> <!-- header --> <div id="header"> <div class="row_1"> <ul class="menu"> <li><a href="membre.php">Accueil</a></li> <li><a href="modifpseudo.php">Modifier Pseudo</a></li> <li><a href="modifpass.php>Modifier Mot de Passe</a></li> <li><a href="modifprofil.php">Modifier profil</a></li> <li><a href="suppcompt-4.php">Supprimer compte</a></li> <li><a href="upload.php">Upload</a></li> <li><a class="last" href="index-6.php">Forum</a></li> </ul> </div> <div class="row_2"> <a href="index.php"><img alt="" src="images/logo.jpg" /></a> </div> </div> Bienvenue <?php echo htmlentities(trim($_SESSION['pseudo'])); ?><br/> <a href="deconnexion.php">Déconnexion</a><br/> Mon Profil: <?php echo htmlentities(trim($_SESSION['profil']));?> </body> </html>
Partager