Bonjour,
voila je suis debutant en webmastering et j ai commencer un scrit php (voir ci dessous).
Et mes liens me menent sur une page d 'erreur et ma variable $page ne fonctionne pas.
Proposer moi des solutions!!!!
SVP
Voila le script:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Bienvenue sur mon site !</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
#conteneur {
width: 800px;
background: #4100F4;
margin:auto;
}
#onglethaut{
height:30px;
background:#000000;
}
#haut {
height: 200px;
background: #20BF00;
padding:10px;
}
#gauche{
height: 722px;
width:150px;
background:#40A497;
float:left;
}
#droit{
height: 722px;
background:#40A497;
float:right;
}
#millieu{
height: 800px;
background:477B76;
}
#gauche a {
display:block;
background:#E3F400;
margin-right:5px;
padding:5px;
float:left;
text-align:center;
}
#gauche a:hover {
border-top:3px outset #4100F4;
}
#accueil,
#demonstrations,
#newsleter,
#contact {
display:none;
}
</style>
</head>
<body>
<div id="conteneur">
<div id="haut">
</div>
<div id="gauche">
<br><a href="index.php?page=accueil" class="actif"> acceuil</a></br><br></br>
<br><a href="index.php?page=demonstrations" class="actif"> demonstrations</a></br><br></br>
<br><a href="index.php?page=newsleter" class="actif"> newsleter</a></br><br></br>
<br><a href="index.php?page=contact" class="actif"> contact</a></br><br></br>
</div>
<div id="droit">
droit de la page
</div>
<div id="millieu">
<?php
if(isset($_GET["page"]))
{
$page = $_GET["page"];
if($page == "accueil")
{
echo'
<h3>bienvenue</h3>';
}
elseif($page == "demonstrations")
{
echo "liste des demonstrations";
}
elseif($page == "newsleter")
{
echo '
<br>Nom</br>
<input type="text" name="Nom"/><br></br>
<br>Prénom</br>
<input type="text" name="Prénom"/><br></br>
<br>Pseudo*</br>
<input type="text" name="Pseudo"/><br></br>
<br>E-mail</br>
<input type="text" name="E-mail"/><br></br>
<input type="submit" value="S\'inscrire"
</form>
</div>' ; }
elseif($page == "contact")
{
echo 'contacter moi!';
}
else
{
echo 'Erreur';}
}
{
echo"la variable n 'existe pas!!!!";
}
?>
<br></br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>
</body>
</html>