Parse error: parse error, unexpected $end in
Résolu/Fermé
A voir également:
- Parse error: parse error, unexpected $end in
- Cmos checksum error ✓ - Forum Carte-mère/mémoire
- Fan error lenovo - Forum Refroidissement
- Error 10 pioneer ✓ - Forum Autoradio
- Playback error reconnect in 3s (1/5) francais - Forum Box et Streaming vidéo
- Whea error occt - Forum Processeur
27 réponses
sitexw
Messages postés
9
Date d'inscription
mercredi 15 novembre 2006
Statut
Membre
Dernière intervention
30 avril 2017
14
2 avril 2008 à 14:59
2 avril 2008 à 14:59
voila moi aussi g un problem !!!!!
sa me marque
---> Parse error: syntax error, unexpected $end in ........../bande-haut.php on line 82
alors que mon script est simple :
____________________________________________________________________________
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<?php
$COOKIE_USER = $_COOKIE['USER'];
if (isset($COOKIE_USER)) {
{
echo "<meta http-equiv='refresh' content='0;url=connect-verif-pass-oui-2.php'>";
}
?>
<title>Band haut</title>
</head>
<body
style="background-image: url(images/fond-band-haut.gif);">
<div style="position: absolute; z-index: 5; top: 10px; right: 0px;">
<form method="post" action="connection/connect-verif-pass.php" name="pass">
<table
style="font-family: Arial; width: 100%; height: 100%; text-align: left; margin-left: auto; margin-right: auto;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 100%;" colspan="1" rowspan="3"></td>
<td>Pseudo :</td>
<td style="text-align: right; width: 200px;"><input
name="USER"></td>
</tr>
<tr>
<td>Pass :</td>
<td style="text-align: right; width: 300px;"><input
name="PW" type="password"></td>
</tr>
<tr>
<td style="text-align: right;" colspan="2"
rowspan="1"><input name="123" value="Connection"
onclick="Login()" type="submit"></td>
</tr>
<tr>
<td style="height: 10px;"></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</form>
</div>
<div style="position: absolute; z-index: 2; top: 0px; right: 0px;">
<img style="width: 264px; height: 196px;" alt="" src="images/fon-form-connect.gif">
</div>
</body>
</html>
sa me marque
---> Parse error: syntax error, unexpected $end in ........../bande-haut.php on line 82
alors que mon script est simple :
____________________________________________________________________________
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<?php
$COOKIE_USER = $_COOKIE['USER'];
if (isset($COOKIE_USER)) {
{
echo "<meta http-equiv='refresh' content='0;url=connect-verif-pass-oui-2.php'>";
}
?>
<title>Band haut</title>
</head>
<body
style="background-image: url(images/fond-band-haut.gif);">
<div style="position: absolute; z-index: 5; top: 10px; right: 0px;">
<form method="post" action="connection/connect-verif-pass.php" name="pass">
<table
style="font-family: Arial; width: 100%; height: 100%; text-align: left; margin-left: auto; margin-right: auto;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 100%;" colspan="1" rowspan="3"></td>
<td>Pseudo :</td>
<td style="text-align: right; width: 200px;"><input
name="USER"></td>
</tr>
<tr>
<td>Pass :</td>
<td style="text-align: right; width: 300px;"><input
name="PW" type="password"></td>
</tr>
<tr>
<td style="text-align: right;" colspan="2"
rowspan="1"><input name="123" value="Connection"
onclick="Login()" type="submit"></td>
</tr>
<tr>
<td style="height: 10px;"></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</form>
</div>
<div style="position: absolute; z-index: 2; top: 0px; right: 0px;">
<img style="width: 264px; height: 196px;" alt="" src="images/fon-form-connect.gif">
</div>
</body>
</html>
je me connais pas beaucoup en php
mais voila j'ai mon code qui est fait et il m'affiche :
Parse error: parse error, unexpected $end in C:\Program Files\EasyPHP 2.0b1\www\snowers\traitement.php on line 57
j'ai essayer de regarde si j'avais pas oublier une parenthese ou autre mai rien.
MON CODE:
<?php
$connexion = mysql_connect("localhost","root","");
if ($connexion)
{
// sélection de la base de données
mysql_select_db("ssf", $connexion);
$msg_erreur = "Erreur. Les champs suivants doivent être obligatoirement remplis :<br/><br/>";
$msg_ok = "Votre demande a bien été prise en compte.";
$message = $msg_erreur;
// vérification des champs
if (empty($_POST['nom']))
$message .= "Votre nom<br/>";
if (empty($_POST['prenom']))
$message .= "Votre prenom<br/>";
if (empty($_POST['sport']))
$message .= "Votre sport<br/>";
if (empty($_POST['annee']))
$message .= "Vos annees de pratique<br/>";
if (empty($_POST['matos']))
$message .= "Votre matos<br/>";
if (empty($_POST['prixMatos']))
$message .= "le prix de votre matos<br/>";
// si un champ est vide, on affiche le message d'erreur
if (strlen($message) > strlen($msg_erreur)) {
echo $message;
// sinon c'est ok
}
else
{
foreach($_POST as $index => $valeur) {
$$index = mysql_real_escape_string(trim($valeur));
}
$sql = "INSERT INTO membre VALUES ('', '".$nomMembreJz."', '".$prenomMembreJz."', '".$SportMembreJz."', '".$anneePratiqueJz."', '".$matosJz."', '".$prixMatosJz."', now())";
$res = mysql_query($sql);
if ($res) {
echo $msg_ok;
} else {
echo mysql_error();
}
}
?>
mais voila j'ai mon code qui est fait et il m'affiche :
Parse error: parse error, unexpected $end in C:\Program Files\EasyPHP 2.0b1\www\snowers\traitement.php on line 57
j'ai essayer de regarde si j'avais pas oublier une parenthese ou autre mai rien.
MON CODE:
<?php
$connexion = mysql_connect("localhost","root","");
if ($connexion)
{
// sélection de la base de données
mysql_select_db("ssf", $connexion);
$msg_erreur = "Erreur. Les champs suivants doivent être obligatoirement remplis :<br/><br/>";
$msg_ok = "Votre demande a bien été prise en compte.";
$message = $msg_erreur;
// vérification des champs
if (empty($_POST['nom']))
$message .= "Votre nom<br/>";
if (empty($_POST['prenom']))
$message .= "Votre prenom<br/>";
if (empty($_POST['sport']))
$message .= "Votre sport<br/>";
if (empty($_POST['annee']))
$message .= "Vos annees de pratique<br/>";
if (empty($_POST['matos']))
$message .= "Votre matos<br/>";
if (empty($_POST['prixMatos']))
$message .= "le prix de votre matos<br/>";
// si un champ est vide, on affiche le message d'erreur
if (strlen($message) > strlen($msg_erreur)) {
echo $message;
// sinon c'est ok
}
else
{
foreach($_POST as $index => $valeur) {
$$index = mysql_real_escape_string(trim($valeur));
}
$sql = "INSERT INTO membre VALUES ('', '".$nomMembreJz."', '".$prenomMembreJz."', '".$SportMembreJz."', '".$anneePratiqueJz."', '".$matosJz."', '".$prixMatosJz."', now())";
$res = mysql_query($sql);
if ($res) {
echo $msg_ok;
} else {
echo mysql_error();
}
}
?>
Bonjour, j'ai une erreur alors que tout est bien, enfin il me semble, vous pouvez m'aider svp??
CODE:
<?php
include ("ini.php");
if (isset($_POST['liste']))
{
$g = $_POST['liste'];
$req="Select * from solution";
$result = mysql_query($req,$connection) or die ("Connexion impossible");
while($ln = mysql_fetch_array($result))
{?>
<br><a href="soluc.php?num=<?echo $ln['libsol'];?>"><?php echo $ln['libsol'];?></a>
<?}
}
?>
<html>
<head>
<title>~SVFI-IT~</title>
</head>
<body bgcolor = "black" background="fondvis.jpg">
<font color="red"><center><h1>~~SVFI-IT~~</h1></center></font>
<table height=363 align=center>
<tr>
<td align=center>
<form method="post" action="index.php">
<p>
<font color="Blue"><h3>.::CONSULTATION::.</h3></font>
<font color="red"><label for="pb"><strong>Problème ou Aide :</strong></label></font>
<select size="1" name="liste">
<?
$req="select * from solution";
$result=mysql_query($req,$connection);
while($lig=mysql_fetch_array($result))
{?>
<option><?echo $lig['libsol'];?></option>
<?}
?>
</select>
</p>
<p>
<font color="red"><label for="sol"><strong>Solution :</strong></label></font>
<input type="text" name="sol" id="sol"/>
<br>
</p>
<p>
<input type="submit" value="Rechercher"/>
<input type="reset" value="Effacer"/>
</p>
</form>
</td>
</tr>
<br>
<br>
<tr>
<td align=center>
<form method="post" action="index.php">
<p>
<font color="Blue"><h3>.::AJOUTER::.</h3></font>
<font color="red"><label for="pb1"><strong>Problème :</strong></label></font>
<input type="text" name="pb1" id="pb1"/>
</p>
<p>
<font color="red"><label for="sol1"><strong>Solution :</strong></label></font>
<input type="text" name="sol1" id="sol1"/>
<br>
</p>
<p>
<input type="submit" value="Ajouter"/>
<input type="reset" value="Effacer"/>
</p>
</form>
</td>
</tr>
</table>
</body>
</html>
l'erreur se situe à </html> :s
CODE:
<?php
include ("ini.php");
if (isset($_POST['liste']))
{
$g = $_POST['liste'];
$req="Select * from solution";
$result = mysql_query($req,$connection) or die ("Connexion impossible");
while($ln = mysql_fetch_array($result))
{?>
<br><a href="soluc.php?num=<?echo $ln['libsol'];?>"><?php echo $ln['libsol'];?></a>
<?}
}
?>
<html>
<head>
<title>~SVFI-IT~</title>
</head>
<body bgcolor = "black" background="fondvis.jpg">
<font color="red"><center><h1>~~SVFI-IT~~</h1></center></font>
<table height=363 align=center>
<tr>
<td align=center>
<form method="post" action="index.php">
<p>
<font color="Blue"><h3>.::CONSULTATION::.</h3></font>
<font color="red"><label for="pb"><strong>Problème ou Aide :</strong></label></font>
<select size="1" name="liste">
<?
$req="select * from solution";
$result=mysql_query($req,$connection);
while($lig=mysql_fetch_array($result))
{?>
<option><?echo $lig['libsol'];?></option>
<?}
?>
</select>
</p>
<p>
<font color="red"><label for="sol"><strong>Solution :</strong></label></font>
<input type="text" name="sol" id="sol"/>
<br>
</p>
<p>
<input type="submit" value="Rechercher"/>
<input type="reset" value="Effacer"/>
</p>
</form>
</td>
</tr>
<br>
<br>
<tr>
<td align=center>
<form method="post" action="index.php">
<p>
<font color="Blue"><h3>.::AJOUTER::.</h3></font>
<font color="red"><label for="pb1"><strong>Problème :</strong></label></font>
<input type="text" name="pb1" id="pb1"/>
</p>
<p>
<font color="red"><label for="sol1"><strong>Solution :</strong></label></font>
<input type="text" name="sol1" id="sol1"/>
<br>
</p>
<p>
<input type="submit" value="Ajouter"/>
<input type="reset" value="Effacer"/>
</p>
</form>
</td>
</tr>
</table>
</body>
</html>
l'erreur se situe à </html> :s
salut La_Tueuse,
essai ca, chez moi ca fonctionne ;) :
<?php
if (isset($_POST['liste']))
{
$g = $_POST['liste'];
$req="Select * from solution";
$result = mysql_query($req,$connection) or die ("Connexion impossible");
while($ln = mysql_fetch_array($result))
{?>
<br><a href="soluc.php?num=<?echo $ln['libsol'];?>"><?php echo $ln['libsol'];?></a>
<?php }
}
?>
<html>
<head>
<title>~SVFI-IT~</title>
</head>
<body bgcolor = "black" background="fondvis.jpg">
<font color="red"><center><h1>~~SVFI-IT~~</h1></center></font>
<table height=363 align=center>
<tr>
<td align=center>
<form method="post" action="index.php">
<p>
<font color="Blue"><h3>.::CONSULTATION::.</h3></font>
<font color="red"><label for="pb"><strong>Problème ou Aide :</strong></label></font>
<select size="1" name="liste">
<?php
$req="select * from solution";
$result=mysql_query($req,$connection);
while($lig=mysql_fetch_array($result))
{
echo "<option>".$lig['libsol']."</option>";
}
?>
</select>
</p>
<p>
<font color="red"><label for="sol"><strong>Solution :</strong></label></font>
<input type="text" name="sol" id="sol"/>
<br>
</p>
<p>
<input type="submit" value="Rechercher"/>
<input type="reset" value="Effacer"/>
</p>
</form>
</td>
</tr>
<br>
<br>
<tr>
<td align=center>
<form method="post" action="index.php">
<p>
<font color="Blue"><h3>.::AJOUTER::.</h3></font>
<font color="red"><label for="pb1"><strong>Problème :</strong></label></font>
<input type="text" name="pb1" id="pb1"/>
</p>
<p>
<font color="red"><label for="sol1"><strong>Solution :</strong></label></font>
<input type="text" name="sol1" id="sol1"/>
<br>
</p>
<p>
<input type="submit" value="Ajouter"/>
<input type="reset" value="Effacer"/>
</p>
</form>
</td>
</tr>
</table>
</body>
</html>
essai ca, chez moi ca fonctionne ;) :
<?php
if (isset($_POST['liste']))
{
$g = $_POST['liste'];
$req="Select * from solution";
$result = mysql_query($req,$connection) or die ("Connexion impossible");
while($ln = mysql_fetch_array($result))
{?>
<br><a href="soluc.php?num=<?echo $ln['libsol'];?>"><?php echo $ln['libsol'];?></a>
<?php }
}
?>
<html>
<head>
<title>~SVFI-IT~</title>
</head>
<body bgcolor = "black" background="fondvis.jpg">
<font color="red"><center><h1>~~SVFI-IT~~</h1></center></font>
<table height=363 align=center>
<tr>
<td align=center>
<form method="post" action="index.php">
<p>
<font color="Blue"><h3>.::CONSULTATION::.</h3></font>
<font color="red"><label for="pb"><strong>Problème ou Aide :</strong></label></font>
<select size="1" name="liste">
<?php
$req="select * from solution";
$result=mysql_query($req,$connection);
while($lig=mysql_fetch_array($result))
{
echo "<option>".$lig['libsol']."</option>";
}
?>
</select>
</p>
<p>
<font color="red"><label for="sol"><strong>Solution :</strong></label></font>
<input type="text" name="sol" id="sol"/>
<br>
</p>
<p>
<input type="submit" value="Rechercher"/>
<input type="reset" value="Effacer"/>
</p>
</form>
</td>
</tr>
<br>
<br>
<tr>
<td align=center>
<form method="post" action="index.php">
<p>
<font color="Blue"><h3>.::AJOUTER::.</h3></font>
<font color="red"><label for="pb1"><strong>Problème :</strong></label></font>
<input type="text" name="pb1" id="pb1"/>
</p>
<p>
<font color="red"><label for="sol1"><strong>Solution :</strong></label></font>
<input type="text" name="sol1" id="sol1"/>
<br>
</p>
<p>
<input type="submit" value="Ajouter"/>
<input type="reset" value="Effacer"/>
</p>
</form>
</td>
</tr>
</table>
</body>
</html>
Bonjour, voici mon code, après maintes modifications, je tombe toujours sur la même erreur, pouvez vous m'aider ?
<?php
$mode = $_GET[mode];
$nom = $_POST[nom];
$mdp = $_POST[mdp];
if ($mode == valid) {
mysql_connect("sql.olympe-network.com", "*****", "******");
mysql_select_db("jioparadise_nexteduc");
$default = mysql_query("SELECT * FROM eleves WHERE nom='$nom'");
$try = mysql_fetch_array($default) ;
$bande = $try[bande];
if ($mdp == $try[mdp])
{
echo('Vous êtes connecté, votre bande est '.$try[bande].' et votre nom est '.$nom.'<br />
<a href="index.php?mode=made&nom='.$nom.'&log=on&ban='.$bande.'">Continuer</a>;
$log= "on";
} else {
echo("Mauvais mot de passe, imposteur".$nom."<br />
<a href=\"connect.php\">Reesayer</a>");
$log = "no";
}
}
if ($mode == ) {
echo("
<form action=\"connect.php?mode=valid\" method=\"post\">
Votre nom<br />
<input type=\"text\" name=\"nom\" /><br />Votre mot de passe<br />
<input type=\"text\" name=\"mdp\" /><br /> <input type=\"submit\" value=\"Valider\" />
</form>
");
}
?>
Ca me le fait aussi ...
<?php
$mode = $_GET[mode];
$nom = $_POST[nom];
$mdp = $_POST[mdp];
if ($mode == valid) {
mysql_connect("sql.olympe-network.com", "*****", "******");
mysql_select_db("jioparadise_nexteduc");
$default = mysql_query("SELECT * FROM eleves WHERE nom='$nom'");
$try = mysql_fetch_array($default) ;
$bande = $try[bande];
if ($mdp == $try[mdp])
{
echo('Vous êtes connecté, votre bande est '.$try[bande].' et votre nom est '.$nom.'<br />
<a href="index.php?mode=made&nom='.$nom.'&log=on&ban='.$bande.'">Continuer</a>;
$log= "on";
} else {
echo("Mauvais mot de passe, imposteur".$nom."<br />
<a href=\"connect.php\">Reesayer</a>");
$log = "no";
}
}
if ($mode == ) {
echo("
<form action=\"connect.php?mode=valid\" method=\"post\">
Votre nom<br />
<input type=\"text\" name=\"nom\" /><br />Votre mot de passe<br />
<input type=\"text\" name=\"mdp\" /><br /> <input type=\"submit\" value=\"Valider\" />
</form>
");
}
?>
Ca me le fait aussi ...
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Parse error: syntax error, unexpected $end in ........
Je sais quel genre d'erreur j'ai mais pas moyen de lui mettre la main dessus ...
C'est le seul code en php (le reste était en html)
<?php
if ( $pseudo != null )
{
mysql_connect("127.0.0.1", "root", "");
mysql_select_db("shinigami's tactics");
$test = mysql_query("SELECT COUNT(*) FROM membres WHERE pseudo=$pseudo");
if ($test == 1)
{
?> <img src="image/button-red-off.png" alt="pseudo déjà utilisé" > <?
}
else
{
?> <img src="image/button-green-on.png" alt="pseudo libre" > <?
}
mysql_close()
}
?>
Si vous pouviez m'aider
Je sais quel genre d'erreur j'ai mais pas moyen de lui mettre la main dessus ...
C'est le seul code en php (le reste était en html)
<?php
if ( $pseudo != null )
{
mysql_connect("127.0.0.1", "root", "");
mysql_select_db("shinigami's tactics");
$test = mysql_query("SELECT COUNT(*) FROM membres WHERE pseudo=$pseudo");
if ($test == 1)
{
?> <img src="image/button-red-off.png" alt="pseudo déjà utilisé" > <?
}
else
{
?> <img src="image/button-green-on.png" alt="pseudo libre" > <?
}
mysql_close()
}
?>
Si vous pouviez m'aider
Bonjour, excusez moi mais j'ai moi aussi cette erreur! Ça fait bien 30 minutes que je relis et relis mon code mais je n'arrive pas à trouver mon erreur.... A trop avoir le nez dedans, on ne trouve plus rien!
moviepage.php
Selon moi l'erreur viendrait de la ligne 78
moviepage.php
<style type="text/css"> #fullinfobox{position:absolute;top:10px;left:200px;background-color:#99ccff;width:200px;border:dashed;border-width:1px;padding:10px} </style> <script language="Javascript"><!-- function getinfo(director_name) { //begin AJAX var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { fullinfobox.style.display="block" fullinfobox.innerHTML=xmlHttp.responseText;//reprint text on screen } } var url="getsuggestions.php?studentid="+studentid; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function clearit() { fullinfobox.innerHTML="" fullinfobox.style.display="none" } --></script> <?php // on se connecte à MySQL $db = mysql_connect('localhost', 'root', ''); // on sélectionne la base mysql_select_db('movie',$db); $id2=$_GET["mid"]; $query2="SELECT * FROM movie,directors WHERE director_id=dirid AND movie_id=$id2"; $result=mysql_query($query) or die("Couldnt"); while ($r=mysql_fetch_array($result)) { ?> <a href="" onmouseover="javascript:getinfo('<?echo $r["director_name"];?>')" onmouseout="javascript:clearit()"><?echo $r["movie_name"];?>; </a><br> <? } ?> <span id="fullinfobox" style="display:none"></span> <div id="mytable"> <table border="1"> <a href="javascript:getdata('surname')">Director Name</a> <? while ($r=mysql_fetch_array($result)) { ?> <td><?echo $r["director_name"];?></td> } <? /* $id=$_GET["movie_id"]; $query="SELECT * FROM movie WHERE description=$id"; $result=mysql_query($query); while ($r=mysql_fetch_array($result)) { echo "<a href='comments.php?movieid=".$id."'>". $r["description"]."</a><br>"; } echo $r["movie_name"]; */ ?>
Selon moi l'erreur viendrait de la ligne 78
<a href="" onmouseover="javascript:getinfo('<?echo $r["director_name"];?>')" onmouseout="javascript:clearit()"><?echo $r["movie_name"];?>; </a><br>Mais j'en suis plus très certaine....