Bonjours

SVP , qui peut m'aider,,j'ai un script php dont le quel je voudrais afficher un formulaire page par page (5O enrigistrement par page suivant id)
j'ai fait le code mais rien est fait ,il m'affiche les 200 enrigistrement que j'ai .. pourtant il n'apparait accun erreur...
svp ,qui peut m'aider ou se trouve l'erreur.. et ça sera synpa de sa coté
voici le code..
///////////////////////////////////////////////////
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
 
<?php
session_start();
//require("afficher.php");
include("connexion.php");
connect($host,$user,$mot_passe,$db_name);
if ( !session_is_registered("authen_user")){
#echo '<META HTTP-EQUIV="refresh" CONTENT="0;URL=index.php?erreur=404">';
#redirection instantanée
header("location:index.php?erreur=404");
}
//$id=$POST['id'];
//$sql="select nom from pc WHERE n_serie ='8TMLM4J';
//mysql_query("$sql");
//WHILE($tab=mysql_fetch_array($rs)){
	// echo $tab[nom];}
//$sql = mysql_query("SELECT Id FROM utilisateurs Where Identifiant ='".$user."' AND Pwd ='".$mot_passe."'") ;
 //$result=mysql_num_rows($sql);
 //$_SESSION['Id']=$result['Id'];
 //$row = mysql_fetch_assoc($sql);
 //$_SESSION['Id'] = $row['Id'];
	if (isset($_SESSION['login_successful'])){
 echo "<p align=center><b><font face=Arial size=5 color=red>Bonjours </font></b></p>";
 }
?>
 
 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="css/style.css" rel="stylesheet">
<title></title>
</head>
<body topmargin="0" leftmargin="0">
&nbsp;
<table width="1265" height="902"  border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" bgcolor="#FFFFFF" style="border-collapse: collapse">
<tr>
    <td width="100%" height="126" align="left" valign="top">
<table WIDTH="1265" BORDER="0" CELLPADDING="0" CELLSPACING="0">
            <tr>
                <td COLSPAN="6"><img SRC="img/header.jpg" WIDTH="387" HEIGHT="94"> </td>
           </tr>
	       <tr>
             <td width="89"><a class="linx" href="user_home.php">Consultation  </a></td>
                <td width="111"><a class="linx" href="new.php">Ajouter nouveau</a></td>
                <td width="80"><a class="linx" href="find.php">Recherche</a></td>
			 <td width="100"><a class="linx" href="excel.php">Exportation Excel</a></td>
               <td width="175">&nbsp;
			   </td>
               <td width="87"><a class="linx" href="deco.php">D&eacute;connecxion</a></td>
          </tr>
		  <tr>
		    <td COLSPAN="6">
 
</td>
	    </tr>
      </table>    </td>
</tr>
<tr>
     <td  valign="top"><hr>
	 <table width="1265"  BORDER="1" bordercolor="#BDE7F7" CELLPADDING="0" CELLSPACING="0">
	   <tr>
	     <th width="39"><p align="left" class=text2>N&deg;</th>
		 <th width="90"><p align="left" class=text2>N&deg; de s&eacute;rie</th>
		 <th width="107" ><p align="left" class=text2>N&deg;d'immo</th>
		 <th width="124" ><p align="left" class=text2>N&deg;de Commande</th>
		 <th width="118" ><p align="left" class=text2>Model</th>
		 <th width="115" ><p align="left" class=text2>Date de  r&eacute;ception</th>
		 <th width="105"><p align="left" class=text2>statut affectation</th>
		 <th width="82"><p align="left" class=text2>statut Pc</th>
		 <th width="195"><p align="left" class=text2><strong>b&eacute;n&eacute;ficiaire</strong></th>
		 <th width="105"><p align="left" class=text2>Modifier  statut Affectation</th>
		 <th width="161"><p align="left" class=text2>Modifier  statut pc</th>
	   </tr>
	   <?php
	   $sql="select * from pc ORDER BY id ASC LIMIT 50";
	   $result = mysql_query($sql) or die ('Erreur : '.mysql_error() );
        $total = mysql_num_rows($result);
	   //$rs=mysql_query("$sql");
	   //$total = mysql_num_rows($rs);
	   $i=1;
	   //while($tab=mysql_fetch_array($rs))
	   if($total)
	   { 
 
	     echo "<tr>";
		 echo "<td valign=top><p class=text2>$i</td>";
	     echo "<td valign=top><p class=text2>$tab[1]</td>";
		 echo "<td valign=top><p class=text2>$tab[2]</td>";
		 echo "<td valign=top><p class=text2>$tab[11]</td>";
		 echo "<td valign=top><p class=text2>$tab[12]</td>";
		 echo "<td valign=top><p class=text2>$tab[9]</td>";
		 echo "<td valign=top><p class=text2>$tab[7]</td>";
		 echo "<td valign=top><p class=text2>$tab[8]</td>";
		 echo "<td><p class=text2><img src=img/arrow1.gif border=0> Nom :$tab[3]<br>
		 <img src=img/arrow1.gif border=0> Pr&eacute;nom :$tab[4]<br> 
		 <img src=img/arrow1.gif border=0> matricule :$tab[5] <br> 
		 <img src=img/arrow1.gif border=0> Service/UF :$tab[6]<br>
		 <img src=img/arrow1.gif border=0> Date d'affectation :$tab[10]
		 </td>";
		 if ($tab[8]!="Rebut"){
		 if ($tab[7]!="Affecté"){
		 echo "<td valign=top><p class=text2>
		 <a class=linx href=histo.php?id=$tab[0]>Historique</a><br>
		 <a class=linx href=affect.php?id=$tab[0]>Affecter</a><br>
		 <a class=linx href=update.php?id=$tab[0]>Signaler Libre</a><br>
		 <a class=linx href=delet.php?id=$tab[0]>Supprimer</a><br>
		 </td>";
		}
		 else{
		 echo "<td valign=top><p class=text2>
		 <a class=linx href=histo.php?id=$tab[0]>Historique</a><br>
		 <a class=linx href=update.php?id=$tab[0]>Signaler Libre</a><br>
		 <a class=linx href=delet.php?id=$tab[0]>Supprimer</a><br>
		 </td>";
	    }
		 }
		 else{
		 echo "<td valign=top><p class=text2>
		 <a class=linx href=histo.php?id=$tab[0]>Historique</a><br>
		 <a class=linx href=update.php?id=$tab[0]>Signaler Libre</a><br>
		 <a class=linx href=delet.php?id=$tab[0]>Supprimer</a><br>
		 </td>";
	    }
 
		 echo "<td valign=top><p class=text2>
		 <a class=linx href=update3.php?id=$tab[0]>Signaler fonctionnel</a><br>
		 <a class=linx href=updat4.php?id=$tab[0]>Signaler en reparation</a><br>
		 <a class=linx href=update2.php?id=$tab[0]>Signaler rebut</a><br>
		 <a class=linx href=raffect.php?id=$tab[0]>Réafecter</a><br>
		 </td>";
	     echo "</tr>";
		 $i++;
		 $nombre = 50;  // on va afficher 50 résultats par page.
		 $nombre = 50;  // on va afficher 50 résultats par page.
    if (!isset($limite)){ $limite = 0; 
 
    $path_parts = pathinfo($_SERVER['PHP_SELF']);
     $page = $path_parts['pc_sagem'];
	 }
	 // initialisation des variable suivant et précédent
	 $limitesuivante = $limite + $nombre;
      $limiteprecedente = $limite - $nombre;
	  // button "précedent"
  //<form action="<?php echo $page; ?>" method="post">
  <?php
    if($limite != 0) {
   <form methode="post" action="<?php echo $page; ?>">
    <input type="submit" name="xxx" value="précédents" />
    <input type="hidden" name="limite"" value="<?php echo $limiteprecedente; ?>"/>
    </form>
	?>
	if($limitesuivante < $total) 
 
  <form methode="post" action="<?php echo $page;?>" >
    <input type="submit" name="yyy" value="="suivants"/>
    <input type="hidden" name="limite" value="<?php echo $limitesuivante; ?>" />
  </form>
  ?>  
}
}
}
?>
    </table>
 
    </td>	   
</tr>
</table>
</body>
</html>