Syntax error, unexpected T_CONSTANT_ENCAPSED_
Résolu
bretonm2004
Messages postés
319
Date d'inscription
Statut
Membre
Dernière intervention
-
bretonm2004 Messages postés 319 Date d'inscription Statut Membre Dernière intervention -
bretonm2004 Messages postés 319 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
voici mon code j'ai cette erreur depuis que j'ai ajouté ce bout de code
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/auto7837/public_html/rechercheavendre.php on line 299
<?
mysql_connect('localhost', 'xxxx', 'xxxx');
mysql_select_db("axxxxxx");
$sql = "SELECT * FROM avendrepubliee ORDER BY id DESC";
$req = mysql_query($sql) or die(mysql_error());
$totalDesAnnonces = mysql_num_rows($req) + 1;
$nombreDeAnnoncesParPage = 5;
$nombreDePages = ceil($totalDesAnnonces / $nombreDeAnnoncesParPage);
//Nombre de pages
if (isset($_GET['page'])){$page = intval($_GET['page']);}else{$page=1;}
//On affiche les pages 1-2-3, etc.
$thispage='<span style="float:right;">Page : ';
for ($i = 1 ; $i <= $nombreDePages ; $i++)
{//On ne met pas de lien sur la page actuelle
if ($i == $page){$thispage.=$i;}else{$thispage.'<a href="rechercheravendre.php?page='.$i.'">'.$i.'</a>';}
}
echo $thispage'</span>';
while($row = mysql_fetch_array($req))
{
$id=$row['id']; $typedannonce=$row['typedannonce'];
$marque=$row['marque']; $autres=$row['autres'];
$modele=$row['modele']; $prix=$row['prix'];
$negociable=$row['negociable']; $annee=$row['annee'];
$etat=$row['etat']; $carburant=$row['carburant'];
$kilometrage=$row['kilometrage']; $transmission=$row['transmission'];
$immatricule=$row['immatricule']; $climatisation=$row['climatisation'];
$audio=$row['audio']; $cylindre=$row['cylindre'];
$puissance=$row['puissance']; $consommation=$row['consommation'];
$couleurinterieure=$row['couleurinterieure']; $couleurexterieure=$row['couleurexterieure'];
$email=$row['email']; $message=$row['message']; $date=$row['date']; $image=$row['image'];
echo "<table align='center' width='700' border='0'>
<tr>
<td width='114'>
<center>
<a href='photos/avendrenp/".$row['image1']." ' alt='Voir image en grand'>
<img src='photos/avendrenp/".$row['image1']." ' width='75' />
</a>
</center></td>
<td width='258' height='78'>".$marque." ".$autres." ".$modele." ".$annee." ".$negociable."</td>
<td align='center' width='147'>".$prix."</td>
<td align='center' width='153'>".$date."</td>
</tr>";
}
?>
voici mon code j'ai cette erreur depuis que j'ai ajouté ce bout de code
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/auto7837/public_html/rechercheavendre.php on line 299
<?
mysql_connect('localhost', 'xxxx', 'xxxx');
mysql_select_db("axxxxxx");
$sql = "SELECT * FROM avendrepubliee ORDER BY id DESC";
$req = mysql_query($sql) or die(mysql_error());
$totalDesAnnonces = mysql_num_rows($req) + 1;
$nombreDeAnnoncesParPage = 5;
$nombreDePages = ceil($totalDesAnnonces / $nombreDeAnnoncesParPage);
//Nombre de pages
if (isset($_GET['page'])){$page = intval($_GET['page']);}else{$page=1;}
//On affiche les pages 1-2-3, etc.
$thispage='<span style="float:right;">Page : ';
for ($i = 1 ; $i <= $nombreDePages ; $i++)
{//On ne met pas de lien sur la page actuelle
if ($i == $page){$thispage.=$i;}else{$thispage.'<a href="rechercheravendre.php?page='.$i.'">'.$i.'</a>';}
}
echo $thispage'</span>';
while($row = mysql_fetch_array($req))
{
$id=$row['id']; $typedannonce=$row['typedannonce'];
$marque=$row['marque']; $autres=$row['autres'];
$modele=$row['modele']; $prix=$row['prix'];
$negociable=$row['negociable']; $annee=$row['annee'];
$etat=$row['etat']; $carburant=$row['carburant'];
$kilometrage=$row['kilometrage']; $transmission=$row['transmission'];
$immatricule=$row['immatricule']; $climatisation=$row['climatisation'];
$audio=$row['audio']; $cylindre=$row['cylindre'];
$puissance=$row['puissance']; $consommation=$row['consommation'];
$couleurinterieure=$row['couleurinterieure']; $couleurexterieure=$row['couleurexterieure'];
$email=$row['email']; $message=$row['message']; $date=$row['date']; $image=$row['image'];
echo "<table align='center' width='700' border='0'>
<tr>
<td width='114'>
<center>
<a href='photos/avendrenp/".$row['image1']." ' alt='Voir image en grand'>
<img src='photos/avendrenp/".$row['image1']." ' width='75' />
</a>
</center></td>
<td width='258' height='78'>".$marque." ".$autres." ".$modele." ".$annee." ".$negociable."</td>
<td align='center' width='147'>".$prix."</td>
<td align='center' width='153'>".$date."</td>
</tr>";
}
?>
A voir également:
- Syntax error, unexpected T_CONSTANT_ENCAPSED_
- Cmos checksum error ✓ - Forum Carte-mère/mémoire
- Playback error reconnect in 3s (1/5) francais - Forum Box et Streaming vidéo
- Error 1962 ✓ - Forum PC fixe
- Parse error: syntax error, unexpected token "use" ✓ - Forum PHP
- A javascript error occurred in the main process - Forum Matériel & Système