Bonjour,
Je fais une requete puis j'affiche le resultat sous forme de checkbox.
Je voudrais donc permettre la limitation du nombre d'élément à afficher et gerer le scrollbar.
Merci de bien vouloir m'aider.
Voici mon bout de 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
 <td width="508"><fieldset>
      <legend><strong>Prestations concern&eacute;es par le  contrat</strong></legend>
      <table>
        <tr>
          <?php         
 
  $sqlprestation="SELECT DISTINCT libprest, codprest FROM prestation ORDER BY libprest;";        
 $resultprestation=@mysql_query($sqlprestation);
  $i=1;
  while($row= mysql_fetch_array($resultprestation, MYSQL_ASSOC))
  {
	  if ($i<1)
	  {
 
   echo'<td><input type="checkbox" name="prestation[]" value="'.$row['codprest'].'">'.$row['libprest'].'<td>';
   		$i=$i+2;
	  }
	  else
	  {
		   echo'</tr><tr><td><input type="checkbox" name="prestation[]" value="'.$row['codprest'].'">'.$row['libprest'].'<td>';
		   $i=1;
	  }
  }
?>
          </tr>
        </table>
      </fieldset></td>