bonjoour,

j'ai une base de données d'adhérent d'un club de sport .
et je voudrais lister les adhérent avec les principales caractéristiques mais je voudrais faire des sauts de page tous les 18 membres , par exemple .

je vous mets le code que j'ai fait mais il n'y a pas de saut de page à l'impression. qu'est-ce qui cloche?

merci d'avance

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
$membres = requete_liste_adherent($_GET['titre']);
if (isset($membres)) {
    $nbmembre = count($membres);
} else {
    $nbmembre = 0;
}
?>
<html>
 
<head>
 
    <meta charset="UTF-8">
    <link href="<?php echo $relatif . 'styles/mef.css' ?>" rel='stylesheet' type='text/css' />
    <link href="<?php echo $relatif . 'styles/print.css' ?>" rel='stylesheet' type='text/css' media="print" />
    <script src="<?php echo $relatif . 'js/v_inscr.js' ?>"></script>
 
</head>
 
<body>
<?php
    if($_GET['titre']="JUDO")
        {
            ?>
            <div class="div_conteneur_page" Style="width:99%;height:6000px">
            <?php
        }
        else
        {
            ?>
            <div class="div_conteneur_page" Style="width:99%;height:1000px">
            <?php    
        }
        ?>
 
        <table>
            <tr>
                <td class="logo"><img alt="" height="90" width="80"
                        src="<?php echo $relatif . 'images/judo_club.gif' ?>">
                </td>
                <td>
                    <h1 style="font-size:22px;text-align:center">Liste des adhérents
                        <?php echo '  ', $titre; ?> de la SAISON :
                        <?php echo '  ', $saison; ?>
                    </h1>
                </td>
            </tr>
            <tr>
                <td> </td>
                <td>Nombre d'adhérents : <strong><?php echo '  ', $nbmembre ; ?></strong></td>
            </tr>
        </table>
        <br><br>
 
        <?php
        $n = 1;
        $p = 1;
        if ($nbmembre != 0) {
            foreach ($membres as $retour) {    
 
                $age = calcul_age($retour["inscr_date"]);
                ?>
                <div>
                <table  style="width:70%;margin-left:2px;margin-right:10px">                
 
                    <tr>
                        <td style="font-weight: bold; width: 75px;">
                            <p class="text-aikido">Nom Prénom : </p>
                        </td>
                        <td >
                            <p class="text-champ" style="font-size:14px;weight:150px;font-weight: bold; width: 200px;">
                                <?php echo $retour["inscr_nomprenom"]; ?>
                            </p>
                        </td>                        
                        <td >
                            <p class="text-aikido" style="width:60px">Adresse : </p>
                        </td>
                        <td>
                            <p class="text-champ" style="width:191px">
                                <?php echo $retour["inscr_adresse"]; ?>
                            </p>
                        </td>
                        <td>
                            <p class="text-aikido" style="width:90px" >Code postal - Ville : </p>
                        </td>
                        <td>
                            <p class="text-champ" style="width:200px">
                                <?php echo $retour["com_codepostal"] . '  ' . $retour["com_libel"]; ?>
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 75px">
                            <p class="text-aikido" style="width: 81px">Section : </p>
                        </td>
                        <td>
                            <p class="text-champ">
                                <?php echo $retour["inscr_section"]; ?>
                            </p>
                        </td>
                        <td>
                            <p class="text-aikido">Email : </p>
                        </td>
                        <td>
                            <p class="text-champ" style="width:185px" >
                                <?php echo $retour["inscr_mail"]; ?>
                            </p>
                        </td>
                        <td>
                        <p class="text-aikido">Licence : </p>
                        </td>
                        <td>
                            <p class="text-champ">
                                <?php echo $retour["inscr_licence"]; ?>
                            </p>    
                        </td>
                        <td style="width: 51px">
                            <p class="text-aikido" style="width: 50px">Ceinture : </p>
                        </td>
                        <td>
                            <p class="text-champ" style="width: 80px">
                                <?php echo $retour["ceint_couleur"] ?>
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 75px">
                            <p class="text-aikido" >Date de naissance : </p>
                        </td>
                        <td>
                            <p class="text-champ" style="width: 185px">
                                <?php echo date('d/m/Y', strtotime($retour["inscr_date"])), " - ", $age, " ans"; ?>
                            </p>
                        </td>
                        <td>
                            <p class="text-aikido">Téléphone : </p>
                        </td>
                        <td>
                            <p class="text-champ">
                                <?php echo $retour["inscr_tel_adh"]; ?>
                            </p>
                        </td>
puis la fin de la page
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
<td>
                            <p class="text-aikido">Sexe : </p>
                        </td>
                        <td style="width: 51px">
                            <p class="text-champ">
                                <?php echo $retour["inscr_sexe"]; ?>
                            </p>
                        </td>
 
                        <td>
                            <p class="text-aikido" style="width: 60px">    JVL :</p>
                        </td>
                        <td>
                            <?php
                            if ($age>=10 && $retour["inscr_section"]=="JUDO") 
                            {
                                ?>
                                <input type="checkbox" name="JVL" checked style="width: 42px">
                                <?php
                            }
                            ?>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 75px">
                        </td>
                    </tr>
                        <p>-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                        </p>
                        <?php
                        if ($p == 1 && $n ==16) {
                            ?>
                            <!-------------------------------------------------------------------------------------------------------------------------->
                                <p style="page-break-before:always">    page <?php echo $p+1 ?></p>
                            <!-------------------------------------------------------------------------------------------------------------------------->
                            <?php
                            $n = 0;
                            $p = $p + 1;
                        }
                        if ($p != 1 && $n ==18) {
                            ?>
                            <!-------------------------------------------------------------------------------------------------------------------------->
                                <p style="page-break-before:always">    page <?php echo $p+1 ?></p>
                            <!-------------------------------------------------------------------------------------------------------------------------->
                            <?php
                            $p=$p+1;
                            $n = 0;
                        }
                        $n = $n + 1;
                        ?>
                <table>        
                </div>
            <?php
            }
        }
        ?>
        <br><br>
        <?php
        include($relatif . "commun/pied_gestion.php");
        ?>
    </div>
 
    <script type="text/javascript">
        function imprimer_page() {
            window.print();
        }
    </script>
 
feuille de style CSS 
 
    #impression  {
    display:none;
}
 
@page { 
    size: portrait; 
} 
 
table {
    page-break-after:always;
}
 
div {
    page:etroite;
}