bonjour;
je suis nouveau dans la programmation php. le code suivant affiche tous les resultats en un seul bloc. je veux avoir l'affichage par page de 30 chacune. Merci bcp
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 <?php include_once("configr.php"); mysql_connect($host,$user,$pwd); mysql_select_db($nbd); $cot=$_POST['cote']; $aut=$_POST['aut']; $art=$_POST['art']; $rub=$_POST['rub']; $an=$_POST['an']; $num=$_POST['num']; $req=mysql_query("select * from revue where cote like '%$cot%' and aut like '%$aut%' and art like '%$art%' and rub like '%$rub%'and an like '%$an%'and num like '%$num%'"); ?> <style type="text/css"> </style> <div align="center"> <?php if ( mysql_num_rows($req)!=0) { echo utf8_encode('Nombre de revues trouvées: '); echo (mysql_num_rows($req));?> </div> <table width="85%" height="54" border="0" align="center" cellspacing="2"> <tr bgcolor="#CCCCCC"> <td width="70" height="30" nowrap="nowrap"><div align="center" class="Style2">Cote</div></td> <td width="537"><div align="center" class="Style2">Article</div></td> <td width="100" nowrap="nowrap"><div align="center" class="Style2">Auteur</div></td> <td width="60" nowrap="nowrap"><div align="center" class="Style2">Année</div></td> <td width="60" nowrap="nowrap"><div align="center" class="Style2">Numéro</div> </td> <td width="150" nowrap="nowrap"><div align="center" class="Style2">Rubrique</div> </td> <td width="10" nowrap="nowrap"><div align="center" class="Style2">Page</div> </td> </tr> <?php while ($don=mysql_fetch_row($req)) {?> <tr valign="top" nowrap="nowrap" bgcolor="#FFFFCC" class="xx"> <td height="22" nowrap="nowrap"><div align="left" class="Style1 Style3"><?php echo $don[0] ;?></div></td> <td ><div align="left" class="Style4" lang="fr"><?php echo utf8_encode($don[2]) ;?></div></td> <td nowrap="nowrap"><div align="left" class="Style4"><?php echo utf8_encode($don[1]);?></div></td> <td nowrap="nowrap"><div align="center" class="Style4"><?php echo utf8_encode($don[3]) ;?></div></td> <td nowrap="nowrap"><div align="center" class="Style4"><?php echo $don[4] ;?></div></td> <td nowrap="nowrap"><div align="left" class="Style4"><?php echo utf8_encode($don[5]) ;?></div></td> <td nowrap="nowrap"><div align="center" class="Style4"><?php echo $don[6] ;?></div></td> </tr> <?php } ?> </table> <?php } else echo utf8_encode("<br><div class='Style2'> Aucune revue trouvée</div> " );?>
Partager