Probleme affichage enregistrement region répéter

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Probleme affichage enregistrement region répéter

par le_banban » 29 août 2007, 07:17

je vais faire une essai ce soir, je vous tiens au courant de l'evolution et merci pour votre aide :wink:

je viens de faire les modifs, rien a changer, j'ai toujours le meme probleme :?

étrange quand meme :(

par AB » 29 août 2007, 00:03

non, pas d'erreur dans la table.

Dans le code ci-dessus, pour l'insertion de tes données, j'ai juste remplacé $insertGoTo = "lesdonnees.php"; par $insertGoTo = ""; et cela m'affiche bien tous les enregistrements que je rentre dans le formulaire.

par le_banban » 28 août 2007, 23:15

j'ai pas bien compris, as tu trouver une erreur sur ma table sql ?

par AB » 28 août 2007, 21:25

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ajouttuto")) {
  $insertSQL = sprintf("INSERT INTO tutoriaux (editeur, titre, groupe, url, image) VALUES (%s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['editeur'], "text"),
                       GetSQLValueString($_POST['titre'], "text"),
                       GetSQLValueString($_POST['selectgroupe'], "text"),
                       GetSQLValueString($_POST['url'], "text"),
                       GetSQLValueString($_POST['image'], "text"));

  mysql_select_db($database_config, $config);
  $Result1 = mysql_query($insertSQL, $config) or die(mysql_error());

  $insertGoTo = "lesdonnees.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
} 
Et pourquoi $insertGoTo = "lesdonnees.php"; J'ai testé avec
$insertGoTo = "";
et mes nouveaux enregistrements sont affichés (bonne idée d'avoir donné ta table pour tester) :wink:

par le_banban » 28 août 2007, 07:26

Est ce que lorsque tu ajoutes les enregistrements, ils sont bien dans ta base de données ? Si tu actualises la page, est ce que tu retrouve tes enregistrements manquants ?
Pour repondre à ta question, les enregistrements que j'ajoute à la table avec le formulaire d'ajout figure bien sur celle ci, par contre impossible de les faire apparaitre à la suite les autres

voulez vous un copier coller de ma table sql ? (je pense que qu'il y est un probleme du coté là)

ma table sql

Code : Tout sélectionner

-- -- Structure de la table `tutoriaux` -- CREATE TABLE `tutoriaux` ( `editeur` varchar(150) NOT NULL default '', `titre` varchar(150) NOT NULL default '', `groupe` varchar(150) NOT NULL default '', `url` text NOT NULL, `image` varchar(150) default NULL, `id` smallint(6) NOT NULL auto_increment, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=2382 ;
vous avez trouver une erreur sur la table sql ?

par AB » 28 août 2007, 03:00

Apparemment, je ne vois pas de faute flagrante au niveau de l'insertion. Comme le demande Sékiltoyai, tes nouveaux enregistrements rentrés à l'aide du formulaire, sont-ils effectivement présents dans la bdd?

En attendant, comme j'ai parcouru rapidement le code, deux petites choses :

1/Ce script a dû être produit avec dreamweaver 2004 ou versions précédentes. Depuis la fonction GetSQLValueString a été réécrite car il vaut mieux utiliser mysql_real_escape_string() plutôt que addslashes() pour entrer des données en bdd.
Nouvelle version de cette fonction :
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
note : le "if (!function_exists("GetSQLValueString"))" est pour rendre le script compatible php5 au cas où cette fonction serait déclarée par ailleurs (fichiers inclus par exemples).

2/Plus loin dans le code, pour le calcul de la limite de la requête tu as :
$pageNum_listetuto = 0;
if (isset($_GET['pageNum_listetuto'])) {
  $pageNum_listetuto = $_GET['pageNum_listetuto'];
} 
qui pourrait être avantageusement remplacé par
$pageNum_listetuto = isset($_GET['pageNum_listetuto'])? $_GET['pageNum_listetuto'] : 0;
Bon, c'est juste un peu d'optimisation en passant mais ça ne résoudra pas ton pb.

par Sékiltoyai » 28 août 2007, 01:50

Est ce que lorsque tu ajoutes les enregistrements, ils sont bien dans ta base de données ? Si tu actualises la page, est ce que tu retrouve tes enregistrements manquants ?

par le_banban » 27 août 2007, 22:41

voila le code avec les balises php
<?php require_once('../Connections/config.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];

function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;   
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ajouttuto")) {
  $insertSQL = sprintf("INSERT INTO tutoriaux (editeur, titre, groupe, url, image) VALUES (%s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['editeur'], "text"),
                       GetSQLValueString($_POST['titre'], "text"),
                       GetSQLValueString($_POST['selectgroupe'], "text"),
                       GetSQLValueString($_POST['url'], "text"),
                       GetSQLValueString($_POST['image'], "text"));

  mysql_select_db($database_config, $config);
  $Result1 = mysql_query($insertSQL, $config) or die(mysql_error());

  $insertGoTo = "lesdonnees.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}

$maxRows_listetuto = 30;
$pageNum_listetuto = 0;
if (isset($_GET['pageNum_listetuto'])) {
  $pageNum_listetuto = $_GET['pageNum_listetuto'];
}
$startRow_listetuto = $pageNum_listetuto * $maxRows_listetuto;

mysql_select_db($database_config, $config);
$query_listetuto = "SELECT * FROM tutoriaux ORDER BY editeur ASC";
$query_limit_listetuto = sprintf("%s LIMIT %d, %d", $query_listetuto, $startRow_listetuto, $maxRows_listetuto);
$listetuto = mysql_query($query_limit_listetuto, $config) or die(mysql_error());
$row_listetuto = mysql_fetch_assoc($listetuto);

if (isset($_GET['totalRows_listetuto'])) {
  $totalRows_listetuto = $_GET['totalRows_listetuto'];
} else {
  $all_listetuto = mysql_query($query_listetuto);
  $totalRows_listetuto = mysql_num_rows($all_listetuto);
}
$totalPages_listetuto = ceil($totalRows_listetuto/$maxRows_listetuto)-1;

$queryString_listetuto = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_listetuto") == false &&
        stristr($param, "totalRows_listetuto") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_listetuto = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_listetuto = sprintf("&totalRows_listetuto=%d%s", $totalRows_listetuto, $queryString_listetuto);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/admin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>| Accueil | Admin</title>
<!-- InstanceEndEditable -->
<link href="admincss.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<table width="933" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td height="103" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="933" height="103" class="tdheader">Administration TUTOlink.org </td>
      </tr>
    </table>    </td>
  </tr>
  <tr>
    <td width="155" height="464" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="260" height="464" valign="top" class="tdgauchemenu"><table width="105" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td>Accueil</td>
          </tr>
          <tr>
            <td>les demandes </td>
          </tr>
          <tr>
            <td><a href="lesdonnees.php">les donn&eacute;es </a></td>
          </tr>
          <tr>
            <td>annuaire</td>
          </tr>
          <tr>
            <td><a href="newsletters.php">Newsletters</a></td>
          </tr>
          <tr>
            <td>demande d'info </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>Config sql </td>
          </tr>
          <tr>
            <td><div align="right"><a href="<?php echo $logoutAction ?>">deconnexion</a></div></td>
          </tr>
        </table>         
          <p>&nbsp;</p>
          </td>
        </tr>
    </table></td>
    <td width="778" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr><!-- InstanceBeginEditable name="page" -->
        <td width="778" height="464" valign="top" class="contenu"><table width="356" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr class="tdgauchemenu">
            <td width="90"><div align="center"><a href="lesdonnees.php">tutoriaux</a></div></td>
            <td width="82"><div align="center"><a href="brush/brush.php">Brush</a></div></td>
            <td width="88"><div align="center">Fonts</div></td>
            <td width="96"><div align="center">Degrad&eacute;</div></td>
          </tr>
        </table>
          <p>&nbsp;</p>
          <table width="295" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="295" class="ligneentetetuto">Ajout d'un tutorial &agrave; la base de donn&eacute;e. </td>
            </tr>
            <tr>
              <td height="141" class="ligneentetetuto"><form id="ajouttuto" name="ajouttuto" method="POST" action="<?php echo $editFormAction; ?>">
                <table width="276" border="0" align="center" cellpadding="0" cellspacing="0" class="lignetuto">
                  <tr>
                    <td width="129"><div align="right">Editeur:</div></td>
                    <td width="147"><label>
                      <input name="editeur" type="text" class="lignetuto" id="editeur" />
                    </label></td>
                  </tr>
                  <tr>
                    <td><div align="right">Titre du tutorial: </div></td>
                    <td><label>
                      <input name="titre" type="text" class="lignetuto" id="titre" />
                    </label></td>
                  </tr>
                  <tr>
                    <td><div align="right">Groupe:</div></td>
                    <td><label>
                      <select name="selectgroupe" class="lignetuto" id="selectgroupe">
                        <option value="technique">technique</option>
                        <option value="texture">texture</option>
                        <option value="objet">objet</option>
                        <option value="effettexte">effettexte</option>
                        <option value="web">web</option>
                        <option value="effetimage">effetimage</option>
                      </select>
                    </label></td>
                  </tr>
                  <tr>
                    <td><div align="right">Url:</div></td>
                    <td><label>
                      <input name="url" type="text" class="lignetuto" id="url" />
                    </label></td>
                  </tr>
                  <tr>
                    <td><div align="right">Image:</div></td>
                    <td><label>
                      <input name="image" type="text" class="lignetuto" id="image" />
                    </label></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td><label>
                      <div align="center">
                        <input type="submit" name="Submit" value="Ajouter" />
                      </div>
                      </label></td>
                  </tr>
                </table>
                            <input type="hidden" name="MM_insert" value="ajouttuto">
              </form>
              </td>
            </tr>
          </table>
          <p>&nbsp;</p>
          <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr class="tdgauchemenu">
              <td width="83" class="ligneentetetuto">id</td>
              <td width="158" class="ligneentetetuto">&eacute;diteur</td>
              <td width="332" class="ligneentetetuto">titre</td>
              <td width="117" class="ligneentetetuto">groupe</td>
              <td width="22" class="ligneentetetuto">&nbsp;</td>
              <td width="23" class="ligneentetetuto">&nbsp;</td>
              <td width="25" class="ligneentetetuto">&nbsp;</td>
            </tr>
            <?php do { ?>
              <tr class="tabnormal" onmouseover="this.className='tabover'" onmouseout="this.className='tabnormal'">
                <td><?php echo $row_listetuto['id']; ?></td>
                <td><?php echo $row_listetuto['editeur']; ?></td>
                <td><?php echo $row_listetuto['titre']; ?></td>
                <td><?php echo $row_listetuto['groupe']; ?></td>
                <td><div align="center"><a href="modif_tuto.php?modifID=<?php echo $row_listetuto['id']; ?>"><img src="images/16-tool-b.png" width="16" height="16" border="0" /></a></div></td>
                <td><div align="center"><a href="tutoriaux/viewtuto.php?viewID=<?php echo $row_listetuto['id']; ?>"><img src="images/16-zoom.png" width="16" height="16" border="0" /></a></div></td>
                <td><div align="center"><img src="images/16-square-green-delete.png" width="16" height="16" /></div></td>
              </tr>
              <?php } while ($row_listetuto = mysql_fetch_assoc($listetuto)); ?>
</table>         
          <table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="33" valign="top"><table width="50%" border="0" align="center" class="tdgauchemenu">
                  <tr>
                    <td width="23%" align="center"><?php if ($pageNum_listetuto > 0) { // Show if not first page ?>
                          <a href="<?php printf("%s?pageNum_listetuto=%d%s", $currentPage, 0, $queryString_listetuto); ?>">Premier</a>
                          <?php } // Show if not first page ?>
                    </td>
                    <td width="31%" align="center"><?php if ($pageNum_listetuto > 0) { // Show if not first page ?>
                          <a href="<?php printf("%s?pageNum_listetuto=%d%s", $currentPage, max(0, $pageNum_listetuto - 1), $queryString_listetuto); ?>">Pr&eacute;c&eacute;dent</a>
                          <?php } // Show if not first page ?>
                    </td>
                    <td width="23%" align="center"><?php if ($pageNum_listetuto < $totalPages_listetuto) { // Show if not last page ?>
                          <a href="<?php printf("%s?pageNum_listetuto=%d%s", $currentPage, min($totalPages_listetuto, $pageNum_listetuto + 1), $queryString_listetuto); ?>">Suivant</a>
                          <?php } // Show if not last page ?>
                    </td>
                    <td width="23%" align="center"><?php if ($pageNum_listetuto < $totalPages_listetuto) { // Show if not last page ?>
                          <a href="<?php printf("%s?pageNum_listetuto=%d%s", $currentPage, $totalPages_listetuto, $queryString_listetuto); ?>">Dernier</a>
                          <?php } // Show if not last page ?>
                    </td>
                  </tr>
                </table></td>
            </tr>
          </table>
          <p>&nbsp;</p>
          <p>&nbsp;</p></td>
      <!-- InstanceEndEditable --></tr>
    </table>
    </td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($listetuto);
?>
En faite je trouve bizarre car l'affichage de la région répéter fonctionne tres bien pour les 2378 enregistrement de la table.
Quand j'ajoute un enregistrement à ma table, celui ci s'ajoute bien mais ne s'affiche pas à la suite du tableau de la region répéter ...

j'ai donc les 2378 enregistrements et pas les enregistrements que j'ajoute. Le plus étrange, je n'est aucun message d'erreur php

Je comprend plus rien :shock:

par AB » 27 août 2007, 21:33

D'après ce que tu nous dit, apparemment tout fonctionne correctement excepté la fonction d'insertion de nouveaux enregistrements. C'est bien ça?

Edit : ce serait plus lisible d'entourer ton code avec les balises php du forum car on pourrait bénéficier de la coloration syntaxique

par le_banban » 27 août 2007, 20:57

voila le code de ma page ou j'affiche les enregistrements de ma base

Code : Tout sélectionner

<?php require_once('../Connections/config.php'); ?> <?php $currentPage = $_SERVER["PHP_SELF"]; function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ajouttuto")) { $insertSQL = sprintf("INSERT INTO tutoriaux (editeur, titre, groupe, url, image) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($_POST['editeur'], "text"), GetSQLValueString($_POST['titre'], "text"), GetSQLValueString($_POST['selectgroupe'], "text"), GetSQLValueString($_POST['url'], "text"), GetSQLValueString($_POST['image'], "text")); mysql_select_db($database_config, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); $insertGoTo = "lesdonnees.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } $maxRows_listetuto = 30; $pageNum_listetuto = 0; if (isset($_GET['pageNum_listetuto'])) { $pageNum_listetuto = $_GET['pageNum_listetuto']; } $startRow_listetuto = $pageNum_listetuto * $maxRows_listetuto; mysql_select_db($database_config, $config); $query_listetuto = "SELECT * FROM tutoriaux ORDER BY editeur ASC"; $query_limit_listetuto = sprintf("%s LIMIT %d, %d", $query_listetuto, $startRow_listetuto, $maxRows_listetuto); $listetuto = mysql_query($query_limit_listetuto, $config) or die(mysql_error()); $row_listetuto = mysql_fetch_assoc($listetuto); if (isset($_GET['totalRows_listetuto'])) { $totalRows_listetuto = $_GET['totalRows_listetuto']; } else { $all_listetuto = mysql_query($query_listetuto); $totalRows_listetuto = mysql_num_rows($all_listetuto); } $totalPages_listetuto = ceil($totalRows_listetuto/$maxRows_listetuto)-1; $queryString_listetuto = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_listetuto") == false && stristr($param, "totalRows_listetuto") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_listetuto = "&" . htmlentities(implode("&", $newParams)); } } $queryString_listetuto = sprintf("&totalRows_listetuto=%d%s", $totalRows_listetuto, $queryString_listetuto); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/admin.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <!-- InstanceBeginEditable name="doctitle" --> <title>| Accueil | Admin</title> <!-- InstanceEndEditable --> <link href="admincss.css" rel="stylesheet" type="text/css" /> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> <body> <table width="933" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td height="103" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="933" height="103" class="tdheader">Administration TUTOlink.org </td> </tr> </table> </td> </tr> <tr> <td width="155" height="464" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="260" height="464" valign="top" class="tdgauchemenu"><table width="105" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td>Accueil</td> </tr> <tr> <td>les demandes </td> </tr> <tr> <td><a href="lesdonnees.php">les donn&eacute;es </a></td> </tr> <tr> <td>annuaire</td> </tr> <tr> <td><a href="newsletters.php">Newsletters</a></td> </tr> <tr> <td>demande d'info </td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td>Config sql </td> </tr> <tr> <td><div align="right"><a href="<?php echo $logoutAction ?>">deconnexion</a></div></td> </tr> </table> <p>&nbsp;</p> </td> </tr> </table></td> <td width="778" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr><!-- InstanceBeginEditable name="page" --> <td width="778" height="464" valign="top" class="contenu"><table width="356" border="0" align="center" cellpadding="0" cellspacing="0"> <tr class="tdgauchemenu"> <td width="90"><div align="center"><a href="lesdonnees.php">tutoriaux</a></div></td> <td width="82"><div align="center"><a href="brush/brush.php">Brush</a></div></td> <td width="88"><div align="center">Fonts</div></td> <td width="96"><div align="center">Degrad&eacute;</div></td> </tr> </table> <p>&nbsp;</p> <table width="295" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="295" class="ligneentetetuto">Ajout d'un tutorial &agrave; la base de donn&eacute;e. </td> </tr> <tr> <td height="141" class="ligneentetetuto"><form id="ajouttuto" name="ajouttuto" method="POST" action="<?php echo $editFormAction; ?>"> <table width="276" border="0" align="center" cellpadding="0" cellspacing="0" class="lignetuto"> <tr> <td width="129"><div align="right">Editeur:</div></td> <td width="147"><label> <input name="editeur" type="text" class="lignetuto" id="editeur" /> </label></td> </tr> <tr> <td><div align="right">Titre du tutorial: </div></td> <td><label> <input name="titre" type="text" class="lignetuto" id="titre" /> </label></td> </tr> <tr> <td><div align="right">Groupe:</div></td> <td><label> <select name="selectgroupe" class="lignetuto" id="selectgroupe"> <option value="technique">technique</option> <option value="texture">texture</option> <option value="objet">objet</option> <option value="effettexte">effettexte</option> <option value="web">web</option> <option value="effetimage">effetimage</option> </select> </label></td> </tr> <tr> <td><div align="right">Url:</div></td> <td><label> <input name="url" type="text" class="lignetuto" id="url" /> </label></td> </tr> <tr> <td><div align="right">Image:</div></td> <td><label> <input name="image" type="text" class="lignetuto" id="image" /> </label></td> </tr> <tr> <td>&nbsp;</td> <td><label> <div align="center"> <input type="submit" name="Submit" value="Ajouter" /> </div> </label></td> </tr> </table> <input type="hidden" name="MM_insert" value="ajouttuto"> </form> </td> </tr> </table> <p>&nbsp;</p> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0"> <tr class="tdgauchemenu"> <td width="83" class="ligneentetetuto">id</td> <td width="158" class="ligneentetetuto">&eacute;diteur</td> <td width="332" class="ligneentetetuto">titre</td> <td width="117" class="ligneentetetuto">groupe</td> <td width="22" class="ligneentetetuto">&nbsp;</td> <td width="23" class="ligneentetetuto">&nbsp;</td> <td width="25" class="ligneentetetuto">&nbsp;</td> </tr> <?php do { ?> <tr class="tabnormal" onmouseover="this.className='tabover'" onmouseout="this.className='tabnormal'"> <td><?php echo $row_listetuto['id']; ?></td> <td><?php echo $row_listetuto['editeur']; ?></td> <td><?php echo $row_listetuto['titre']; ?></td> <td><?php echo $row_listetuto['groupe']; ?></td> <td><div align="center"><a href="modif_tuto.php?modifID=<?php echo $row_listetuto['id']; ?>"><img src="images/16-tool-b.png" width="16" height="16" border="0" /></a></div></td> <td><div align="center"><a href="tutoriaux/viewtuto.php?viewID=<?php echo $row_listetuto['id']; ?>"><img src="images/16-zoom.png" width="16" height="16" border="0" /></a></div></td> <td><div align="center"><img src="images/16-square-green-delete.png" width="16" height="16" /></div></td> </tr> <?php } while ($row_listetuto = mysql_fetch_assoc($listetuto)); ?> </table> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="33" valign="top"><table width="50%" border="0" align="center" class="tdgauchemenu"> <tr> <td width="23%" align="center"><?php if ($pageNum_listetuto > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_listetuto=%d%s", $currentPage, 0, $queryString_listetuto); ?>">Premier</a> <?php } // Show if not first page ?> </td> <td width="31%" align="center"><?php if ($pageNum_listetuto > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_listetuto=%d%s", $currentPage, max(0, $pageNum_listetuto - 1), $queryString_listetuto); ?>">Pr&eacute;c&eacute;dent</a> <?php } // Show if not first page ?> </td> <td width="23%" align="center"><?php if ($pageNum_listetuto < $totalPages_listetuto) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_listetuto=%d%s", $currentPage, min($totalPages_listetuto, $pageNum_listetuto + 1), $queryString_listetuto); ?>">Suivant</a> <?php } // Show if not last page ?> </td> <td width="23%" align="center"><?php if ($pageNum_listetuto < $totalPages_listetuto) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_listetuto=%d%s", $currentPage, $totalPages_listetuto, $queryString_listetuto); ?>">Dernier</a> <?php } // Show if not last page ?> </td> </tr> </table></td> </tr> </table> <p>&nbsp;</p> <p>&nbsp;</p></td> <!-- InstanceEndEditable --></tr> </table> </td> </tr> </table> </body> <!-- InstanceEnd --></html> <?php mysql_free_result($listetuto); ?>

par AB » 27 août 2007, 20:54

Si tu nous ne montre aucune ligne de code, ni dans quelles conditions tu as un pb, il sera difficile de t'aider.

Probleme affichage enregistrement region répéter

par le_banban » 27 août 2007, 20:24

Bonjour,

Voila je vous explique mon probleme, j'ai un tableau avec dedans les enregistrements de ma table sql. j'ai ajouter un région répéter (avec adobe dreamweaver) j'ai bien la région répéter qui fonctionne par contre, il ne m'ajoute pas les enregistrement que j'ajoute par la suite

Avez vous une idée du probleme ?