Bonjour,
J'ai un probleme au niveau du compteur, il s'arrete de compter a partir de 85.
voici la page web de mon formulaire :
[ Lien ]
code source :
<?php require_once('connect.php'); ?>
<?php
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"] == "form1")) {
$insertSQL = sprintf("INSERT INTO test (id, pseudo, serveur, age, ville, guilde) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['id'], "int"),
GetSQLValueString($_POST['pseudo'], "text"),
GetSQLValueString($_POST['serveur'], "text"),
GetSQLValueString($_POST['age'], "int"),
GetSQLValueString($_POST['ville'], "text"),
GetSQLValueString($_POST['guilde'], "text"));
mysql_select_db($database_connect, $connect);
$Result1 = mysql_query($insertSQL, $connect) or die(mysql_error());
$insertGoTo = "view.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING']; }
header(sprintf("Location: %s", $insertGoTo));
}
?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_Recordset1 = 500;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_connect, $connect);
$query_Recordset1 = "SELECT * FROM test";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $connect) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?>
<link rel="stylesheet" type="text/css" href="../include/style.css">
<style type="text/css">
<!--
.solid { border: 1px solid #000000;
}
.Style1 {color: #ffff30}
.Style2 {color: #98cc00}
.Style3 {color: #FFFFFF}
.Style4 {color: #cc6633}
-->
</style>
<?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table height="174" border="1" align="center" cellspacing="2" bordercolor="#FFFFFF">
<tr valign="baseline">
<td width="235" height="26" align="left" valign="middle" class="cadre2">Pseudo</td>
<td width="317" align="left" valign="middle" class="cadre2"><input type="text" name="pseudo" value=" " size="32" AUTOCOMPLETE="OFF" onBlur="if(this.value==''){this.value=' '};nextfield='GoAhead'" onFocus="if (this.value==' '){this.value=''};"/></td>
</tr>
<tr valign="baseline">
<td height="26" align="left" valign="middle" class="cadre2">Dernier Serveur</td>
<td align="left" valign="middle" class="cadre2"><input type="text" name="serveur" value=" " size="32" AUTOCOMPLETE="OFF" onBlur="if(this.value==''){this.value=' '};nextfield='GoAhead'" onFocus="if (this.value==' '){this.value=''};"/></td>
</tr>
<tr valign="baseline">
<td height="26" align="left" valign="middle" class="cadre2">Age</td>
<td align="left" valign="middle" class="cadre2"><input name="age" type="text" onFocus="if (this.value==' '){this.value=''};" onBlur="if(this.value==''){this.value=' '};nextfield='GoAhead'" value=" " size="5" maxlength="7" AUTOCOMPLETE="OFF"/></td>
</tr>
<tr valign="baseline">
<td height="26" align="left" valign="middle" class="cadre2">Ville</td>
<td align="left" valign="middle" class="cadre2"><input name="ville" type="text" value=" " size="32" autocomplete="OFF" onBlur="if(this.value==''){this.value=' '};nextfield='GoAhead'" onFocus="if (this.value==' '){this.value=''};"/></td>
</tr>
<tr valign="baseline">
<td height="26" align="left" valign="middle" class="cadre2">Guilde</td>
<td align="left" valign="middle" class="cadre2"><input name="guilde" type="text" value=" " size="32" AUTOCOMPLETE="OFF" onBlur="if(this.value==''){this.value=' '};nextfield='GoAhead'" onFocus="if (this.value==' '){this.value=''};"/></td>
</tr>
<tr valign="baseline">
<td height="28" colspan="2" align="center" valign="middle" nowrap="nowrap" class="cadre2"><input name="submit" type="submit" value="Insérer l'enregistrement" /></td>
</tr>
</table>
<input name="id" type="hidden" />
<input type="hidden" name="MM_insert" value="form1" />
</form>
<BODY text=#d09c68 vLink=#000000 aLink=#000000 link=#000000 bgColor=#000000
background=site/personnage/bijoux/blanver1.jpg>
<DIV align=right><BR></DIV>
<p> Il y a <?php echo $totalRows_Recordset1; ?> tests </p>
<TABLE cellSpacing=0 cellPadding=0 width="80%" align=center border=0>
<TBODY>
<TR>
<TD width="3%" height=25><IMG height=29 src="site/personnage/bijoux/hg.jpg"
width=25 border=0></TD>
<TD width="95%" background=site/personnage/bijoux/bh1.jpg height=25> </TD>
<TD width="2%" height=25><IMG height=29 src="site/personnage/bijoux/hd.jpg"
width=25 border=0></TD></TR>
<TR>
<TD width="3%" background=site/personnage/bijoux/bg2.jpg height=37> </TD>
<TD width="95%" height=37><table width="100%" border="1" align="center" cellpadding="5" cellspacing="0" class="solid">
<tr>
<?php do { ?>
<td width="4%" align="left" class="cadre2"><div align="center" class="Style3"><?php echo $row_Recordset1['id']; ?></div></td>
<td width="20%" align="left" class="cadre2"><div align="center" class="Style1"><?php echo $row_Recordset1['pseudo']; ?></div></td>
<td width="20%" align="left" class="cadre2"><div align="center" class="Style2"><?php echo $row_Recordset1['serveur']; ?></div></td>
<td width="20%" align="left" class="cadre2"><div align="center" class="Style4"><?php echo $row_Recordset1['age']; ?></div></td>
<td width="20%" align="left" class="cadre2"><div align="center"><?php echo $row_Recordset1['ville']; ?></div></td>
<td width="20%" align="left" class="cadre2"><div align="center"><?php echo $row_Recordset1['guilde']; ?></div></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table></TD>
<TD width="2%" background=site/personnage/bijoux/barreg1.jpg
height=37> </TD></TR>
<TR>
<TD width="3%"><IMG height=29 src="site/personnage/bijoux/bg.jpg" width=25
border=0></TD>
<TD width="95%" background=site/personnage/bijoux/bb1.jpg> </TD>
<TD width="2%"><IMG height=29 src="site/personnage/bijoux/bd.jpg"
width=25></TD></TR></TBODY></TABLE>
<br />
<br />
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center"><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>">Premier</a>
<?php } // Show if not first page ?>
</td>
<td width="31%" align="center"><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>">Précédent</a>
<?php } // Show if not first page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>">Suivant</a>
<?php } // Show if not last page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>">Dernier</a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>
<?php } // Show if recordset not empty ?>
<?php
mysql_free_result($Recordset1);
?>
<?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
Aucun enregistrement à afficher
<?php } // Show if recordset empty ?>
--------------
Je n'arrive pas a trouver d'ou vient le probleme
Si quelqu'un pouvais m'aider ca serait cool.
Merci d'avance
A bientot