Parse error: syntax error, unexpected $end in

Résolu
allhambra -  
 net -
Bonjour,
j'ai ce message d'erreur qui s'affiche, mais je ne sais pas pourquoi.
Au niveau des accolades, ça à l'air bon.

Toute aide est bienvenue

voici mon code

<?php

require('includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_check = tep_db_fetch_array($product_check_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
if ($product_check['total'] < 1) {
?>
<tr>
<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
} else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);

tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}

if (tep_not_null($product_info['products_model'])) {
$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
$products_name = $product_info['products_name'];
}
if(tep_session_is_registered('wishlist_id')) { ?> <tr> <td class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td> </tr> <?php tep_session_unregister('wishlist_id'); }?>

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

<td align="center"><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td>

<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main">
<?php
if (tep_not_null($product_info['products_image'])) {
?>
<table border="0" cellspacing="0" cellpadding="2" align="right">
<tr>
<td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
</td>
</tr>
</table>
<?php
}
?>
<p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
?>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
</tr>
<?php
$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
$products_options_array = array();
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
while ($products_options = tep_db_fetch_array($products_options_query)) {
$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
if ($products_options['options_values_price'] != '0') {
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
}
}

if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
} else {
$selected_attribute = false;
}
?>
<tr>
<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$reviews = tep_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
?>
<tr>
<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}

if (tep_not_null($product_info['products_url'])) {
?>
<tr>
<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
</tr>
<?php
} else {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
</tr>
<?php
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_also_purchased(3600);
} else {
include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}

?>
</td>
</tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
}
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Configuration: Windows XP
Firefox 2.0.0.12

3 réponses

  1. Polux31 Messages postés 7219 Statut Membre 1 204
     
    bonjour,

    c'est tout ce que tu as comme info ??? tu dois avoir un numéro de ligne dans le message d'erreur ... parce que là :-s
    1
  2. allhambra
     
    Bonjour,
    Merci de ta reponse,
    la ligne indiqué est la dernière, mais j'ai trouvé l'accolade manquante :

    <?php

    require('includes/application_top.php');

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

    $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_check = tep_db_fetch_array($product_check_query);
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    </head>
    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->

    <!-- body //-->
    <table border="0" width="100%" cellspacing="3" cellpadding="3">
    <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- left_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
    <!-- left_navigation_eof //-->
    </table></td>
    <!-- body_text //-->
    <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <?php
    if ($product_check['total'] < 1) {
    ?>
    <tr>
    <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
    </tr>
    <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>
    <tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    <tr class="infoBoxContents">
    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <?php
    } else {
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_info = tep_db_fetch_array($product_info_query);

    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
    }
    1
  3. Mesoma
     
    Bonjour!
    J'ai moi aussi le même problème avec la "syntax error, unexpected $end", et j'ai beau chercher, je ne trouve pas... Je suis dessus depuis hier, je ne trouve personne capable de m'aider et je désespère du coup je viens vous voir!

    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?director_id="+director_id;
     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);
    
    
    include("getsuggestions.php");
    
    
    
    $id2=$_GET["dirid"];
    
    $query2=("SELECT * FROM movie,directors WHERE director_id=dirid AND movie_id=$id2") or die (mysql_error());
    
    $result=mysql_query($query) or die("Couldnt");
    while ($r=mysql_fetch_array($result))
    {
    ?>
    
    <a href='directorspage.php?directorid=".$id2."' onmouseover="javascript:getinfo('<?echo $r["director_id"];?>')" 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>
    	
    <?
    }
    
    ?>
    


    J'ai l'impression que l'erreur vient de cette ligne
    <a href='directorspage.php?directorid=".$id2."' onmouseover="javascript:getinfo('<?echo $r["director_id"];?>')" onmouseout="javascript:clearit()"><?echo $r["movie_name"];?>
    </a><br>;

    Mais je n'arrive pas à la corriger.

    Un grand merci pour votre aide!!
    0
    1. Un codeur
       
      Bonjour,

      Essaye de remplacer cette ligne :
      <a href='directorspage.php?directorid=".$id2."' onmouseover="javascript:getinfo('<?echo $r["director_id"];?>')" onmouseout="javascript:clearit()"><?echo $r["movie_name"];?>
      </a><br>;


      par celle là :
      <a href='directorspage.php?directorid=".$id2."' onmouseover="javascript:getinfo('<?php echo $r["director_id"]; ?>')" onmouseout="javascript:clearit()"><?php echo $r["movie_name"]; ?>
      </a><br>;


      Ca devrait normalement marché.
      0
    2. Mesoma
       
      Ouuui, ça marche, merci beaucoup!
      0
    3. net
       
      Bonjour, j'ai un probleme avec mon code php
      Parse error: syntax error, unexpected $end in C:\EasyPHP-5.3.9\www\forum_ECHANGE\afficher_commentaire.php on line 148


      <!DOCTYPE html>

      <html lang="en">
      <head>
      <link rel="stylesheet" type="text/css" href="style.css" />
      <meta charset="utf-8" />
      <title>Sujet</title>
      </head>

      <body>
      <!-- Page Global -->
      <div id="global">

      <!-- menu -->
      <?php include("includes/menu.php"); ?>
      <!-- en-tete -->
      <?php include("includes/en_tete.php"); ?>
      <!-- section -->
      <div id="section">

      <!-- navigation -->
      <?php include("includes/navigation.php"); ?>

      <!-- article -->
      <div class="article">
      <?php
      $id=$_GET['id'];
      $categorie=$_GET['categorie'];
      $nom_message=$_GET['nom_message'];
      echo '<span class="titre_categorie"><a href="afficher_message.php?categorie='.$categorie.' ">'.$categorie.'</a> < '.$nom_message.'</span>';
      ?>
      <!-- afficher question ou sujet -->
      <?php include("includes/connection_db.php"); ?>
      <?php
      if ($id=$_GET['id'])
      {
      $sql="SELECT * FROM $tbl_name1 where id='$id' ";
      $result=mysql_query($sql);
      $rows=mysql_fetch_array($result);
      ?>
      <table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="1" bgcolor="#FFFFFF">
      <tr>
      <td bgcolor="#F8F7F1"><strong><?php echo $rows['nom_message']; ?></strong></td>
      </tr>
      <tr>
      <td bgcolor="#F8F7F1"><?php echo $rows['message']; ?></td>
      </tr>
      <tr>
      <td bgcolor="#F8F7F1"><strong>Par :</strong> <? echo $rows['nom']; ?>
      <strong>Email : </strong><?php echo $rows['email'];?></td>
      </tr>
      <tr>
      <td bgcolor="#F8F7F1"><strong>Date : </strong><?php echo $rows['date']; ?></td>
      </tr>
      </table>
      <br>

      <!-- afficher commentaire -->
      <?php
      $sql2="SELECT * FROM $tbl_name2 WHERE question_id='$id'";
      $result2=mysql_query($sql2);
      while($rows=mysql_fetch_array($result2))
      {
      ?>
      <table width="400px" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" accept-charset="utf-8">
      <tr>
      <td>
      <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
      <tr>
      <td width="18%" bgcolor="#F8F7F1"><strong>Nom</strong></td>
      <td width="5%" bgcolor="#F8F7F1">:</td>
      <td width="77%" bgcolor="#F8F7F1"><?php echo $rows['c_nom']; ?></td>
      </tr>
      <tr>
      <td bgcolor="#F8F7F1"><strong>Email</strong></td>
      <td bgcolor="#F8F7F1">:</td>
      <td bgcolor="#F8F7F1"><?php echo $rows['c_email']; ?></td>
      </tr>
      <tr>
      <td bgcolor="#F8F7F1"><strong>Reponse</strong></td>
      <td bgcolor="#F8F7F1">:</td>
      <td bgcolor="#F8F7F1"><?php echo $rows['c_reponse']; ?></td>
      </tr>
      <tr>
      <td bgcolor="#F8F7F1"><strong>Date</strong></td>
      <td bgcolor="#F8F7F1">:</td>
      <td bgcolor="#F8F7F1"><?php echo $rows['c_date']; ?></td>
      </tr>
      </table>
      </td>
      </tr>
      </table>
      <br>
      <?
      }
      $sql3="SELECT vu FROM $tbl_name1 WHERE id='$id'";
      $result3=mysql_query($sql3);
      $rows=mysql_fetch_array($result3);
      $view=$rows['vu'];

      if(empty($view))
      {
      $view=1;
      $sql4="INSERT INTO $tbl_name1(vu) VALUES('$view') WHERE id='$id'";
      $result4=mysql_query($sql4);
      }

      $addview=$view+1;
      $sql5="update $tbl_name1 set vu='$addview' WHERE id='$id'";
      $result5=mysql_query($sql5);
      mysql_close();
      }
      ?>
      <br>
      <table width="500px" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
      <form name="form1" method="post" action="ajouter_commentaire.php">
      <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
      <tr>
      <td width="18%"><strong>Nom</strong></td>
      <td width="3%">:</td>
      <td width="79%"><input name="c_nom" type="text" id="c_nom" size="45"></td>
      </tr>
      <tr>
      <td><strong>Email</strong></td>
      <td>:</td>
      <td><input name="c_email" type="text" id="c_email" size="45"></td>
      </tr>
      <tr>
      <td valign="top"><strong>Reponse</strong></td>
      <td valign="top">:</td>
      <td><textarea name="c_reponse" cols="45" rows="3" id="c_reponse"></textarea></td>
      </tr>
      <tr>
      <td> </td>
      <td><input name="id" id="id" type="hidden" value="<?php echo $id; ?>">
      <input name="categorie" id="categorie" type="hidden" value="<?php echo $categorie; ?>"</td>
      <td><input type="submit" name="Submit" value="Commentez"> <input type="reset" name="Submit2" value="Reset"></td>
      </tr>
      </table>
      </form>
      </table>
      </div>
      </div>
      </div>
      <!-- pied de page -->
      <?php include("includes/pied_de_page.php"); ?>
      </body>
      </html>
      0