Problème page PHP

Fermé
simon59150 Messages postés 65 Date d'inscription vendredi 7 décembre 2007 Statut Membre Dernière intervention 17 avril 2010 - 18 janv. 2008 à 18:07
simon59150 Messages postés 65 Date d'inscription vendredi 7 décembre 2007 Statut Membre Dernière intervention 17 avril 2010 - 18 janv. 2008 à 18:16
Bonjour,
j'ai crée une page pour mon espace membres, mais quand je me connecte et que j'y accèdes, je vois une page blanche.

Pouvez-vous m'aider ?

Voici mon code :

<?php
session_start();

// si la variable de session "login" n'existe pas, le visiteur
// n'a rien à faire ici
if(!isset($_SESSION['login']))
{
	header("location: login.php"); // redirection
	exit; // arrêt du script
}

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
   <head>
       <title>Potter86</title>
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
   </head>
 
<link rel="stylesheet" media="screen" type="text/css" title="Exemple" href="http://perso.numericable.fr/simond/design.css" />

   <body>
 
       <!-- L'en-tête -->
 
       <div id="en_tete">
           
       </div>
 
       <!-- Les menus -->
 
       <div id="menu">        
           <div class="element_menu">
               <h3>Accueil</h3>
               <ul>
                   <li><a href="http://perso.numericable.fr/simond/index.html">Index</a></li>

                 </ul>
           </div>
       
<div class="element_menu">
               <h3>Histoires</h3>
               <ul>
                   <li><a href="http://perso.numericable.fr/simond/ecole/index.html">Ecole...</a></li>
<li><a href="http://perso.numericable.fr/simond/chambre/index.html">Chambre...</a></li>
<li><a href="http://perso.numericable.fr/simond/prisonnier/index.html">Prisonnier...</a></li>
<li><a href="http://perso.numericable.fr/simond/coupe/index.html">Coupe...</a></li>
<li><a href="http://perso.numericable.fr/simond/ordre/index.html">Ordre...</a></li>
<li><a href="http://perso.numericable.fr/simond/prince/index.html">Prince...</a></li>
<li><a href="http://perso.numericable.fr/simond/reliques/index.html">Reliques...</a></li>

                                  </ul>
           </div>

           <div class="element_menu">
               <h3>Encyclopédie</h3>
               <ul>
                   <li><a href="http://perso.numericable.fr/simond/encyclopedie/a-propos.htm">A propos</a></li>

                                  </ul>
           </div>

<div class="element_menu">
               <h3>Autre</h3>
               <ul>
                   <li><a href="http://perso.numericable.fr/simond/contact/mail.htm">Contact</a></li>
<li><a href="http://perso.numericable.fr/simond/fan/fictions/index.htm">Fanfictions</a></li>
<li><a href="http://perso.numericable.fr/simond/fan/arts/index.htm">Fanarts</a></li>
<li><a href="http://perso.numericable.fr/simond/plus/index.htm">Petits plus</a></li>
                   
                                 </ul>
           </div>        
       </div>



       <!-- Le corps -->
 
       <div id="corps">
           <h1>Potter86</h1>
       
           <p>
              <h2>Recrut</h2><br><center>NOUS RECRUTONS<br><br><br>

 

- Des posteurs et administrateurs de news<br><br>

Si un des role vous correspond, <a href="contact/mail.htm">contactez nous</a>.


           </p>
       </div>
 
       <!-- Le pied de page -->
 
       
 
   </body>
</html>';
?>
A voir également:

3 réponses

La chaîne qui contient ton HTML contient des ' qu'il faudrait echapper.

Le plus simple c'est que tu sortes directement le contenu HTML sans passer par PHP:

<?php
session_start();

// si la variable de session "login" n'existe pas, le visiteur
// n'a rien à faire ici
if(!isset($_SESSION['login']))
{
header("location: login.php"); // redirection
exit; // arrêt du script
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Potter86</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<link rel="stylesheet" media="screen" type="text/css" title="Exemple" href="http://perso.numericable.fr/simond/design.css" />

<body>
.......
0
simon59150 Messages postés 65 Date d'inscription vendredi 7 décembre 2007 Statut Membre Dernière intervention 17 avril 2010 5
18 janv. 2008 à 18:13
OK.. Merci beaucoup. Je vais essayer
0
simon59150 Messages postés 65 Date d'inscription vendredi 7 décembre 2007 Statut Membre Dernière intervention 17 avril 2010 5
18 janv. 2008 à 18:16
Bonjour, j'ai suivi ton conseil... Mais je n'arrive pas à afficher le pseudo de la personne connectée.
0