Petit problème de synthaxe je pense...
Posté : 17 juil. 2010, 21:26
Bonjour je suis débutant en php et je viens de créer un code tout bête qui permet d'afficher un bouton avec un style1 ou un style2 en fonction de la page en cours..
Le code est le suivant :
Wamp m'affiche :
Le code est le suivant :
<?php
$savoir="ok";
?>
<div align="center">
<style>
input.btn1 {
color:#000066;
<!-- BLEU -->
font: bold small 'trebuchet ms',helvetica,sans-serif;
}
input.btn2 {
color:#FF6600;
<!-- ORANGE-->
font: bold small 'trebuchet ms',helvetica,sans-serif;
}
</style>
<?php
IF(isset($savoir)&&$savoir=="ok"){
echo'<input type="button" name="lien" value="Page 1" class="btn1"onClick="self.location.href='/index.php?page=post'"> ';
}
ELSE{
echo'<input type="button" name="lien" value="Page 1" class="btn1"onClick="self.location.href='/index.php?page=post'"> ';
}
?>
Wamp m'affiche :
Parse error: parse error in C:\wamp\www\bouton.php on line 24
et impossible de rendre ce mini script actif... quelqu'un pourrait t'il m'aider ?