[PHP] probleme avec ce code

Résolu/Fermé
antic80 Messages postés 4785 Date d'inscription lundi 30 mai 2005 Statut Contributeur Dernière intervention 9 septembre 2009 - 2 mai 2006 à 15:25
antic80 Messages postés 4785 Date d'inscription lundi 30 mai 2005 Statut Contributeur Dernière intervention 9 septembre 2009 - 2 mai 2006 à 20:54
bonjour

voila j'ai un petit soucis au nivo de ce code


if(isset($_POST['Cat'])) $Cat=$_POST['Cat'];
else $Cat="";


<meta http-equiv="refresh" content="5; URL=http://facilmaths3.keogratuit.com/Membre/Exercices/TN/Fiche1.php?categorie=".$Cat>



en fait ca deconne au nivo de la ligne <meta......

j'arrive a recuperer le numéro de la catégorie mais après ca marche pas.
A voir également:

4 réponses

kilian Messages postés 8731 Date d'inscription vendredi 19 septembre 2003 Statut Modérateur Dernière intervention 20 août 2016 1 527
2 mai 2006 à 20:03
Salut,

Le code Php et html doivent être isolé.
Le php commence par
<?
et se termine par
?>
0
antic80 Messages postés 4785 Date d'inscription lundi 30 mai 2005 Statut Contributeur Dernière intervention 9 septembre 2009 1 159
2 mai 2006 à 20:10
ou ca je l'ai fais mais la ligne <meta.... ne marche pas
0
kilian Messages postés 8731 Date d'inscription vendredi 19 septembre 2003 Statut Modérateur Dernière intervention 20 août 2016 1 527
2 mai 2006 à 20:16
Non tu ne l'as pas fait puisque tu as cette erreur :-)
Php tombe sur <meta.... et ça c'est du code html donc il ne comprend pas.

Voilà ce que ça devrait être:
<?
if(isset($_POST['Cat'])) $Cat=$_POST['Cat'];
else $Cat="";
?>

<meta http-equiv="refresh" content="5; URL=http://facilmaths3.keogratuit.com/Membre/Exercices/TN/Fiche1.php?categorie=<? echo $Cat ?> ">
0
antic80 Messages postés 4785 Date d'inscription lundi 30 mai 2005 Statut Contributeur Dernière intervention 9 septembre 2009 1 159
2 mai 2006 à 20:54
ok je te remercie
0