Aide SVp :Erreur dans le code
milanino
Messages postés
22
Statut
Membre
-
lucienk49140 Messages postés 550 Statut Membre -
lucienk49140 Messages postés 550 Statut Membre -
<?php
/* connection */
require "config.php";
require "connect_db.php";
require "functions.php";
$session_timeout = param_extract("session_timeout");
if(isset($_REQUEST["action_"])) {
switch($_REQUEST["action_"]) {
case "login":
//Tableau global : qui forme le caddie
$sql = "SELECT login FROM data_users ";
$sql .= "WHERE login = '" . $_REQUEST["login"] . "' ";
$sql .= "AND admin = 0 AND password = '" . $_REQUEST["password"] . "';";
$user = db_query($database_name, $sql);
if($user_ = fetch_array($user)) {
// Login avec sccès -> On ouvre la session
session_start();
$_SESSION["login"] = $user_["login"];
// Mise en place de la cookie
setcookie("login", $user_["login"]);
//on vide la table caddie s'il était plein depuis la dernière visite
$login = $user_["login"];
$sql = "DELETE FROM 'caddie' WHERE CONVERT('login' USING utf8) = '".$login."'";
$res = db_query($database_name, $sql);
} else {
// login/password incorrect
$error_message = "Login ou mot de passe incoorect";
}
break;
case "delog":
//Enlever la cookie
setcookie ("login", "", time() - 3600);
// Destruction de la session
// unset($_SESSION["login"]);
// session_destroy();
break;
case "cad":
if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
//mise en place dans la table caddie
if(isset($_REQUEST["nomProduitCom"])){
//Ajoout de l'article dans le caddie
$nom_prod = $_REQUEST["nomProduitCom"];
$login = $_COOKIE["login"];
$sql = "INSERT INTO caddie VALUES('".$login."','".$nom_prod."')";
$res = db_query($database_name, $sql);
}
}
} // switch
} // isset
?>
<html>
<head>
<title> Achat en ligne </title>
<link href="css/style_index_intro.css" type="text/css" rel="stylesheet">
<?php
if(isset($_REQUEST["action_"]))
{
?>
<script type="text/javascript"><!--
document.location = "index.php?rand=<?php echo rand(1,1000); ?>";
--></script>
<?
}
?>
<script language="JavaScript">
<!--
/***********************************************
* Verification de champs de saisies
***********************************************/
function formCheck(formobj){
// Nom des champs à verifier
var fieldRequired = Array("login", "password");
// La description de chaque champ
var fieldDescription = Array("le login Utilistaeur", "le mot de passe");
// Le message d'alerte
var alertMsg = "Veuillez completer ces champs:\n";
var l_Msg = alertMsg.length;
for (var i = 0; i < fieldRequired.length; i++){
var obj = formobj.elements[fieldRequired[i]];
if (obj){
switch(obj.type){
case "select-one":
if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "select-multiple":
if (obj.selectedIndex == -1){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "text":
case "textarea":
if (obj.value == "" || obj.value == null){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
default:
}
if (obj.type == undefined){
var blnchecked = false;
for (var j = 0; j < obj.length; j++){
if (obj[j].checked){
blnchecked = true;
}
}
if (!blnchecked){
alertMsg += " - " + fieldDescription[i] + "\n";
}
}
}
}
if (alertMsg.length == l_Msg){
return true;
}else{
alert(alertMsg);
return false;
}
}
// -->
</script>
</HEAD>
<BODY>
<DIV id=conteneur>
<DIV id=header>
<DIV id="formbox">
<FORM id="topform" action="index_search.php" method="POST">
<INPUT id="topsearchbox" alt=Search maxLength=255 name="query">
<INPUT class="topformbutton" type="submit" value="chercher">
</FORM>
</DIV>
</DIV>
<DIV id=haut>
<UL class=menuhaut>
<?
if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
?>
<LI><A href="index.php">[Accueil]</A>
<LI><A href="panier.php">[Mes Commandes]</A>
<?
//Consultation du caddie
$sql = "SELECT * FROM caddie where login = '".$_COOKIE["login"]."'";
$result = db_query($database_name,$sql);
//calcul de nombre de produit ajouter dans le caddie
$i = 0;
while ($row = mysql_fetch_row($result))
{
$i++;
}
if($i <> 0)
echo "<LI><A href=\"caddie.php\">[Panier ".$i."]</A>";
?>
<LI><A href="profil.php">[Mon profil]</A>
<LI><A href="index.php?action_=delog">[Deconnexion]</A>
<?
}
else
{
?>
<LI><A href="admin.php">[Admin]</A>
<LI><A href="index.php">[Accueil]</A>
<?
}
?>
</LI></UL>
</DIV>
<DIV id=gauche>
<br>
<p> Liste des Catégories </p>
<?php
$sql = "SELECT categorie FROM categories";
$result = db_query($database_name,$sql);
echo "<UL class=menugauche>";
while ($row = mysql_fetch_row($result))
{
echo "<LI><A href=\"index.php?cat_=".$row[0]."\">[".$row[0]."]</A>";
}
echo "</LI></UL>";
?>
</DIV>
<DIV id=droite>
<?php if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
?>
<UL class=menudroit>
<p>Bienvenue: <? echo $_COOKIE["login"];?></p>
<?
}
else
{
?>
<form name="login_form" method="POST" action="index.php?action_=login" class="css">
<fieldset>
<legend>Inscription</legend>
<label for="login">login:</label>
<input type="text" size="10" maxlength="50" name="login"/>
<br />
<label for="password">Pass:</label>
<input type="password" size="10" maxlength="50" name="password"/>
<br/>
<input type="submit" name="envoie" value="Ok" style="float=right;" onclick = "return formCheck(this);"/>
</fieldset>
</form>
<UL class=menudroit>
<LI><A href="inscrit.htm">Inscrivez-Vous</A>
</LI>
</UL>
<?
}
?>
</DIV>
<DIV id=centre>
<?php // Affichage des produits
if(!isset($_REQUEST["cat_"])){
$sql = "SELECT * FROM produit order by prix";
$result = db_query($database_name,$sql);
echo "<div id=\"listing\">";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"432\">";
echo "<tbody><tr>";
echo "<td width=\"440\">
<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\" width=\"432\">";
echo "<th align=\"left\" height=\"20\" width=\"200\">Article</th>";
echo "<th width=\"60\">Prix</th>";
echo "<th width=\"37\">Stock</th>";
echo "<th width=\"34\">Photo</th>";
echo "</table></td></tr>";
echo "</tbody></table>";
while ($row = mysql_fetch_row($result))
{
echo "<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo "<tbody>";
if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
echo "<tr> ";
echo "<td class=\"ligne\">
<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo " <td width=\"200\">$row[0] $row[5]</td>";
echo " <td align=\"center\" width=\"110\">$row[3]€</td>";
echo " <td align=\"center\" width=\"37\">$row[2]</td>";
echo " <td align=\"center\" width=\"34\">Pas photo</td>";
if( $row[2] <= 0 )//Verification des indisponibilité du stock
{
echo "<td align=\"center\" width=\"40\"><h4>Indisponible</h4></td>";
}
else
{
echo"<td align=\"center\" width=\"40\"> <form name =\"formCom\" id =\"formu\" method=\"POST\" action=\"commander.php\"><input type=\"submit\" name=\"btnomProduitCom\" class=\"valid\" value=\"Comm\"/><input type=\"hidden\" name=\"nomProduitCom\" value=\"$row[0]\"/></form></td>";
echo"<td align=\"center\" width=\"40\"> <form name =\"formCom\" id =\"formu\" method=\"POST\" action=\"index.php?action_=cad\"><input type=\"submit\" name=\"btnomProduitCom\" class=\"valid\" value=\"caddie\"/><input type=\"hidden\" name=\"nomProduitCom\" value=\"$row[0]\"/></form></td>";
}
echo " </table></td></tr></tbody></table>";
}
else
{
echo "<tr> ";
//echo "<td class=\"ligne\"><table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo " <td width=\"200\">$row[0] $row[5]</td>";
echo " <td align=\"center\" width=\"110\">$row[3]€</td>";
echo " <td align=\"center\" width=\"37\">$row[2]</td>";
echo " <td align=\"center\" width=\"34\">Pas photo</td>";
//echo " <td align=\"center\" width=\"40\"><form method=\"POST\" id =\"formu\" action=\"panier.php?action_=sup\"><input type=\"hidden\" name =\"com_supp\"value=\"$row[2]\"/> <input type=\"submit\" class=\"valid\" name=\"btnomProduitSup\" value=\"Sup\"/></form></td>";
//echo"</td>";
echo " </tr></tbody></table>";
}
echo"</tr></tbody></table>";
}
echo "</div>";
}
else //affichage par catégorie
{
$sql = "SELECT * FROM produit where categorie = '".$_REQUEST["cat_"]."' order by prix";
$result = db_query($database_name,$sql);
echo "<div id=\"listing\">";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"432\">";
echo "<tbody><tr>";
echo "<td width=\"440\">
<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\" width=\"432\">";
echo "<th align=\"left\" height=\"20\" width=\"200\">Article</th>";
echo "<th width=\"60\">Prix</th>";
echo "<th width=\"37\">Stock</th>";
echo "<th width=\"34\">Photo</th>";
echo "</table></td></tr>";
echo "</tbody></table>";
while ($row = mysql_fetch_row($result))
{
echo "<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo "<tbody>";
if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
echo "<tr> ";
echo "<td class=\"ligne\">
<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo " <td width=\"200\">$row[0] $row[5]</td>";
echo " <td align=\"center\" width=\"110\">$row[3]€</td>";
echo " <td align=\"center\" width=\"37\">$row[2]</td>";
echo " <td align=\"center\" width=\"34\">Pas photo</td>";
if( $row[2] <= 0 )//Verification des indisponibilité du stock
{
echo "<td align=\"center\" width=\"40\"><h4>Indisponible</h4></td>";
}
else
{
echo"<td align=\"center\" width=\"40\"> <form name =\"formCom\" id =\"formu\" method=\"POST\" action=\"commander.php\"><input type=\"submit\" name=\"btnomProduitCom\" class=\"valid\" value=\"Comm\"/><input type=\"hidden\" name=\"nomProduitCom\" value=\"$row[0]\"/></form></td>";
echo"<td align=\"center\" width=\"40\"> <form name =\"formCom\" id =\"formu\" method=\"POST\" action=\"index.php?action_=cad\"><input type=\"submit\" name=\"btnomProduitCom\" class=\"valid\" value=\"caddie\"/><input type=\"hidden\" name=\"nomProduitCom\" value=\"$row[0]\"/></form></td>";
}
echo " </table></td></tr></tbody></table>";
}
else
{
echo "<tr> ";
//echo "<td class=\"ligne\"><table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo " <td width=\"200\">$row[0] $row[5]</td>";
echo " <td align=\"center\" width=\"110\">$row[3]€</td>";
echo " <td align=\"center\" width=\"37\">$row[2]</td>";
echo " <td align=\"center\" width=\"34\">Pas photo</td>";
//echo " <td align=\"center\" width=\"40\"><form method=\"POST\" id =\"formu\" action=\"panier.php?action_=sup\"><input type=\"hidden\" name =\"com_supp\"value=\"$row[2]\"/> <input type=\"submit\" class=\"valid\" name=\"btnomProduitSup\" value=\"Sup\"/></form></td>";
//echo"</td>";
echo " </tr></tbody></table>";
}
echo"</tr></tbody></table>";
}
echo "</div>";
}
// fin affichage des articles
?>
?>
</div>
<DIV id=pied><p align=center>Copyright 2006</P></DIV>
</DIV>
</body>
</html>
Lorsque j'exécute le code il m'affiche Parse error: syntax error, unexpected end of file in C:\Program Files (x86)\EasyPHP-12.1\www\magasin\index.php on line 467
aide SVP???
/* connection */
require "config.php";
require "connect_db.php";
require "functions.php";
$session_timeout = param_extract("session_timeout");
if(isset($_REQUEST["action_"])) {
switch($_REQUEST["action_"]) {
case "login":
//Tableau global : qui forme le caddie
$sql = "SELECT login FROM data_users ";
$sql .= "WHERE login = '" . $_REQUEST["login"] . "' ";
$sql .= "AND admin = 0 AND password = '" . $_REQUEST["password"] . "';";
$user = db_query($database_name, $sql);
if($user_ = fetch_array($user)) {
// Login avec sccès -> On ouvre la session
session_start();
$_SESSION["login"] = $user_["login"];
// Mise en place de la cookie
setcookie("login", $user_["login"]);
//on vide la table caddie s'il était plein depuis la dernière visite
$login = $user_["login"];
$sql = "DELETE FROM 'caddie' WHERE CONVERT('login' USING utf8) = '".$login."'";
$res = db_query($database_name, $sql);
} else {
// login/password incorrect
$error_message = "Login ou mot de passe incoorect";
}
break;
case "delog":
//Enlever la cookie
setcookie ("login", "", time() - 3600);
// Destruction de la session
// unset($_SESSION["login"]);
// session_destroy();
break;
case "cad":
if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
//mise en place dans la table caddie
if(isset($_REQUEST["nomProduitCom"])){
//Ajoout de l'article dans le caddie
$nom_prod = $_REQUEST["nomProduitCom"];
$login = $_COOKIE["login"];
$sql = "INSERT INTO caddie VALUES('".$login."','".$nom_prod."')";
$res = db_query($database_name, $sql);
}
}
} // switch
} // isset
?>
<html>
<head>
<title> Achat en ligne </title>
<link href="css/style_index_intro.css" type="text/css" rel="stylesheet">
<?php
if(isset($_REQUEST["action_"]))
{
?>
<script type="text/javascript"><!--
document.location = "index.php?rand=<?php echo rand(1,1000); ?>";
--></script>
<?
}
?>
<script language="JavaScript">
<!--
/***********************************************
* Verification de champs de saisies
***********************************************/
function formCheck(formobj){
// Nom des champs à verifier
var fieldRequired = Array("login", "password");
// La description de chaque champ
var fieldDescription = Array("le login Utilistaeur", "le mot de passe");
// Le message d'alerte
var alertMsg = "Veuillez completer ces champs:\n";
var l_Msg = alertMsg.length;
for (var i = 0; i < fieldRequired.length; i++){
var obj = formobj.elements[fieldRequired[i]];
if (obj){
switch(obj.type){
case "select-one":
if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "select-multiple":
if (obj.selectedIndex == -1){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "text":
case "textarea":
if (obj.value == "" || obj.value == null){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
default:
}
if (obj.type == undefined){
var blnchecked = false;
for (var j = 0; j < obj.length; j++){
if (obj[j].checked){
blnchecked = true;
}
}
if (!blnchecked){
alertMsg += " - " + fieldDescription[i] + "\n";
}
}
}
}
if (alertMsg.length == l_Msg){
return true;
}else{
alert(alertMsg);
return false;
}
}
// -->
</script>
</HEAD>
<BODY>
<DIV id=conteneur>
<DIV id=header>
<DIV id="formbox">
<FORM id="topform" action="index_search.php" method="POST">
<INPUT id="topsearchbox" alt=Search maxLength=255 name="query">
<INPUT class="topformbutton" type="submit" value="chercher">
</FORM>
</DIV>
</DIV>
<DIV id=haut>
<UL class=menuhaut>
<?
if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
?>
<LI><A href="index.php">[Accueil]</A>
<LI><A href="panier.php">[Mes Commandes]</A>
<?
//Consultation du caddie
$sql = "SELECT * FROM caddie where login = '".$_COOKIE["login"]."'";
$result = db_query($database_name,$sql);
//calcul de nombre de produit ajouter dans le caddie
$i = 0;
while ($row = mysql_fetch_row($result))
{
$i++;
}
if($i <> 0)
echo "<LI><A href=\"caddie.php\">[Panier ".$i."]</A>";
?>
<LI><A href="profil.php">[Mon profil]</A>
<LI><A href="index.php?action_=delog">[Deconnexion]</A>
<?
}
else
{
?>
<LI><A href="admin.php">[Admin]</A>
<LI><A href="index.php">[Accueil]</A>
<?
}
?>
</LI></UL>
</DIV>
<DIV id=gauche>
<br>
<p> Liste des Catégories </p>
<?php
$sql = "SELECT categorie FROM categories";
$result = db_query($database_name,$sql);
echo "<UL class=menugauche>";
while ($row = mysql_fetch_row($result))
{
echo "<LI><A href=\"index.php?cat_=".$row[0]."\">[".$row[0]."]</A>";
}
echo "</LI></UL>";
?>
</DIV>
<DIV id=droite>
<?php if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
?>
<UL class=menudroit>
<p>Bienvenue: <? echo $_COOKIE["login"];?></p>
<?
}
else
{
?>
<form name="login_form" method="POST" action="index.php?action_=login" class="css">
<fieldset>
<legend>Inscription</legend>
<label for="login">login:</label>
<input type="text" size="10" maxlength="50" name="login"/>
<br />
<label for="password">Pass:</label>
<input type="password" size="10" maxlength="50" name="password"/>
<br/>
<input type="submit" name="envoie" value="Ok" style="float=right;" onclick = "return formCheck(this);"/>
</fieldset>
</form>
<UL class=menudroit>
<LI><A href="inscrit.htm">Inscrivez-Vous</A>
</LI>
</UL>
<?
}
?>
</DIV>
<DIV id=centre>
<?php // Affichage des produits
if(!isset($_REQUEST["cat_"])){
$sql = "SELECT * FROM produit order by prix";
$result = db_query($database_name,$sql);
echo "<div id=\"listing\">";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"432\">";
echo "<tbody><tr>";
echo "<td width=\"440\">
<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\" width=\"432\">";
echo "<th align=\"left\" height=\"20\" width=\"200\">Article</th>";
echo "<th width=\"60\">Prix</th>";
echo "<th width=\"37\">Stock</th>";
echo "<th width=\"34\">Photo</th>";
echo "</table></td></tr>";
echo "</tbody></table>";
while ($row = mysql_fetch_row($result))
{
echo "<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo "<tbody>";
if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
echo "<tr> ";
echo "<td class=\"ligne\">
<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo " <td width=\"200\">$row[0] $row[5]</td>";
echo " <td align=\"center\" width=\"110\">$row[3]€</td>";
echo " <td align=\"center\" width=\"37\">$row[2]</td>";
echo " <td align=\"center\" width=\"34\">Pas photo</td>";
if( $row[2] <= 0 )//Verification des indisponibilité du stock
{
echo "<td align=\"center\" width=\"40\"><h4>Indisponible</h4></td>";
}
else
{
echo"<td align=\"center\" width=\"40\"> <form name =\"formCom\" id =\"formu\" method=\"POST\" action=\"commander.php\"><input type=\"submit\" name=\"btnomProduitCom\" class=\"valid\" value=\"Comm\"/><input type=\"hidden\" name=\"nomProduitCom\" value=\"$row[0]\"/></form></td>";
echo"<td align=\"center\" width=\"40\"> <form name =\"formCom\" id =\"formu\" method=\"POST\" action=\"index.php?action_=cad\"><input type=\"submit\" name=\"btnomProduitCom\" class=\"valid\" value=\"caddie\"/><input type=\"hidden\" name=\"nomProduitCom\" value=\"$row[0]\"/></form></td>";
}
echo " </table></td></tr></tbody></table>";
}
else
{
echo "<tr> ";
//echo "<td class=\"ligne\"><table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo " <td width=\"200\">$row[0] $row[5]</td>";
echo " <td align=\"center\" width=\"110\">$row[3]€</td>";
echo " <td align=\"center\" width=\"37\">$row[2]</td>";
echo " <td align=\"center\" width=\"34\">Pas photo</td>";
//echo " <td align=\"center\" width=\"40\"><form method=\"POST\" id =\"formu\" action=\"panier.php?action_=sup\"><input type=\"hidden\" name =\"com_supp\"value=\"$row[2]\"/> <input type=\"submit\" class=\"valid\" name=\"btnomProduitSup\" value=\"Sup\"/></form></td>";
//echo"</td>";
echo " </tr></tbody></table>";
}
echo"</tr></tbody></table>";
}
echo "</div>";
}
else //affichage par catégorie
{
$sql = "SELECT * FROM produit where categorie = '".$_REQUEST["cat_"]."' order by prix";
$result = db_query($database_name,$sql);
echo "<div id=\"listing\">";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"432\">";
echo "<tbody><tr>";
echo "<td width=\"440\">
<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\" width=\"432\">";
echo "<th align=\"left\" height=\"20\" width=\"200\">Article</th>";
echo "<th width=\"60\">Prix</th>";
echo "<th width=\"37\">Stock</th>";
echo "<th width=\"34\">Photo</th>";
echo "</table></td></tr>";
echo "</tbody></table>";
while ($row = mysql_fetch_row($result))
{
echo "<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo "<tbody>";
if(isset($_COOKIE["login"]))
{ // Utilisateur est déja connecté
echo "<tr> ";
echo "<td class=\"ligne\">
<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo " <td width=\"200\">$row[0] $row[5]</td>";
echo " <td align=\"center\" width=\"110\">$row[3]€</td>";
echo " <td align=\"center\" width=\"37\">$row[2]</td>";
echo " <td align=\"center\" width=\"34\">Pas photo</td>";
if( $row[2] <= 0 )//Verification des indisponibilité du stock
{
echo "<td align=\"center\" width=\"40\"><h4>Indisponible</h4></td>";
}
else
{
echo"<td align=\"center\" width=\"40\"> <form name =\"formCom\" id =\"formu\" method=\"POST\" action=\"commander.php\"><input type=\"submit\" name=\"btnomProduitCom\" class=\"valid\" value=\"Comm\"/><input type=\"hidden\" name=\"nomProduitCom\" value=\"$row[0]\"/></form></td>";
echo"<td align=\"center\" width=\"40\"> <form name =\"formCom\" id =\"formu\" method=\"POST\" action=\"index.php?action_=cad\"><input type=\"submit\" name=\"btnomProduitCom\" class=\"valid\" value=\"caddie\"/><input type=\"hidden\" name=\"nomProduitCom\" value=\"$row[0]\"/></form></td>";
}
echo " </table></td></tr></tbody></table>";
}
else
{
echo "<tr> ";
//echo "<td class=\"ligne\"><table border=\"0\" cellpadding=\"4\" cellspacing=\"1\">";
echo " <td width=\"200\">$row[0] $row[5]</td>";
echo " <td align=\"center\" width=\"110\">$row[3]€</td>";
echo " <td align=\"center\" width=\"37\">$row[2]</td>";
echo " <td align=\"center\" width=\"34\">Pas photo</td>";
//echo " <td align=\"center\" width=\"40\"><form method=\"POST\" id =\"formu\" action=\"panier.php?action_=sup\"><input type=\"hidden\" name =\"com_supp\"value=\"$row[2]\"/> <input type=\"submit\" class=\"valid\" name=\"btnomProduitSup\" value=\"Sup\"/></form></td>";
//echo"</td>";
echo " </tr></tbody></table>";
}
echo"</tr></tbody></table>";
}
echo "</div>";
}
// fin affichage des articles
?>
?>
</div>
<DIV id=pied><p align=center>Copyright 2006</P></DIV>
</DIV>
</body>
</html>
Lorsque j'exécute le code il m'affiche Parse error: syntax error, unexpected end of file in C:\Program Files (x86)\EasyPHP-12.1\www\magasin\index.php on line 467
aide SVP???
10 réponses
Bonjour milanino,
A la ligne 459, Enlever un ?> et cela devrai marcher !
En l'attente de votre reponce, je vous souhaite de bonne fête de fin d'année !
A la ligne 459, Enlever un ?> et cela devrai marcher !
En l'attente de votre reponce, je vous souhaite de bonne fête de fin d'année !
Après avoir étudier le plus près ton script, il y a beaucoup d'erreur et tu n'utilise pas non plus un éditeur de texte comme Notepad ++ ou Sublime Text 2 !!
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Je veux bien essayer de t'aider, mais je vais essayer de voir d'ou celas peut venir, mais si tu veut, je peut te l'envoyer par e-mail si j'ai réussi a le faire marcher ce petit bout de script. Si tu le souhaite, tu peut me donner une adresse e-mail ou tu veux que je le mette sur le forum !!
C'est a toi de décider !
C'est a toi de décider !
Merci Lucienk voila mon mail : houcem88@gmail.com
Est ce que vous avez un projet php comme un magasin ou boutique quelque chose comme ça
MERCI
Est ce que vous avez un projet php comme un magasin ou boutique quelque chose comme ça
MERCI
Non, moi, je suis actuellement en fin de création de projet qui consiste a pouvoir visionner des série téléviser mais sur internet par des hebergeur légalement identifier ! Mais il me manque plus q'un VPS pour pouvoir heberger mon site internet ! Mon adresse e-mail et : lucienk49140@gmail.com