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 :
http://l4pfr.free.fr/view.php
code source :
<?php require_once('connect.php'); ?>
<?phpfunction 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">
----
Pseudo,
,
----
Dernier Serveur,
,
----
Age,
,
----
Ville,
,
----
Guilde,
,
----
,
</form>
Il y a <?php echo $totalRows_Recordset1; ?> tests
----
,
,
,
----
,
<table width="100%" border="1" align="center" cellpadding="5" cellspacing="0" class="solid">
----
<?php do { ?>
,
<?php echo $row_Recordset1['id']; ?>
</td>
<?php echo $row_Recordset1['pseudo']; ?>,
<?php echo $row_Recordset1['serveur']; ?>,
<?php echo $row_Recordset1['age']; ?>,
<?php echo $row_Recordset1['ville']; ?>,
<?php echo $row_Recordset1['guilde']; ?>,
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</TD>
<TD width="2%" background=site/personnage/bijoux/barreg1.jpg
height=37> </TD></TR>
<TR>
<TD width="3%"></TD>
<TD width="95%" background=site/personnage/bijoux/bb1.jpg> </TD>
<TD width="2%"></TD></TR></TBODY></TABLE>
----
<?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
">Premier
<?php } // Show if not first page ?>
,
<?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
">Précédent
<?php } // Show if not first page ?>
,
<?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
">Suivant
<?php } // Show if not last page ?>
,
<?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
">Dernier
<?php } // Show if not last page ?>
,
<?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
Afficher la suite