Parse error: syntax error php
Résolu
moulesfrites
Messages postés
25
Date d'inscription
Statut
Membre
Dernière intervention
-
pyschopathe Messages postés 1974 Date d'inscription Statut Membre Dernière intervention -
pyschopathe Messages postés 1974 Date d'inscription Statut Membre Dernière intervention -
Bonjour, j'ai simplifié mon script au max et j'ai tjs l'erreur suivante sur le site
Parse error: syntax error, unexpected T_LOGICAL_OR in /data/nfs/ftp/00/50/49/root/index.php on line 12
<!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" lang="fr"><head><title>Mini-chat</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head><body>
<?php
$reponse="";
mysql_connect("localhost", "user2-5049-0", "*****")or die("erreur de connexion au serveur $host"); // Connexion à MySQL
mysql_select_db("bdfete"); // Sélection de la base
$reponse = mysql_query("SELECT * FROM tablebuffet ORDER BY genrebuffet");
$donnees="";
while ($donnees = mysql_fetch_array($reponse) ) or die(mysql_error()) //boucle tab buffet poisson
{
}
mysql_close();
?>
bla bla
</body>
</html>
merci pour vos réponses
Parse error: syntax error, unexpected T_LOGICAL_OR in /data/nfs/ftp/00/50/49/root/index.php on line 12
<!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" lang="fr"><head><title>Mini-chat</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head><body>
<?php
$reponse="";
mysql_connect("localhost", "user2-5049-0", "*****")or die("erreur de connexion au serveur $host"); // Connexion à MySQL
mysql_select_db("bdfete"); // Sélection de la base
$reponse = mysql_query("SELECT * FROM tablebuffet ORDER BY genrebuffet");
$donnees="";
while ($donnees = mysql_fetch_array($reponse) ) or die(mysql_error()) //boucle tab buffet poisson
{
}
mysql_close();
?>
bla bla
</body>
</html>
merci pour vos réponses
4 réponses
Cette expression n'a aucun sens :
while ($donnees = mysql_fetch_array($reponse) ) or die(mysql_error())Enlève le or die() et ça devrait marcher.
merci pour ta réponse mais je l'ai fait et j'avais cette ceci :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /data/nfs/ftp/00/50/49/root/index.php on line 12
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /data/nfs/ftp/00/50/49/root/index.php on line 12