Page 1 sur 2

explorer et session: secours !!!

Posté : 30 nov. 2005, 20:59
par alcofribas
Bonjour à tous,

J'utilise des sessions pour faire fonctionner un panier sur un site commercial.
Et je viens de me rendre compte que tout fonctionne parfaitement sur Netscape, Safari... sauf sur IE !
Voici le code qui récupère les données en POST et les envoie dans mon tableau (1). L'autre code est celui qui récupère les données du tableau pour afficher le panier en lui-même (2).
Avec IE, je reçois le message "Votre panier est vide...". Je ne comprends pas pourquoi. Pouvez-vous m'aider.

(1)
<?php

if (isset($_POST["Commander"])){

    $refprod = $_POST["reference"];
    $qt = $_POST["quantite"];
    $pu = $_POST["prixunitaire"];
    $pa = $_POST["prixactuel"];

    require_once('deja.php');
    
    if(!verif_panier($refprod)) {
   
            //vérification de la validité des données du formulaire //
                if(!is_numeric($qt)) { 
                
                require_once('qt_non_num.php');
                exit(); 
                
                } else {
                
                    array_push($_SESSION ['caddie']['produit']['quantite'],$qt);
                    
                    array_push($_SESSION ['caddie']['produit']['reference'],$refprod);
                    
                    array_push($_SESSION['caddie']['produit']['prixunitaire'],$pu);
                    array_push($_SESSION['caddie']['produit']['prixactuel'],$pa);
      
                    $total_prod = ($qt * $pa);
                    
                    array_push($_SESSION['caddie']['produit']['totalproduit'],$total_prod);
                    

                    $acompte_prod = (($qt * $pu) / 2);
                    
                    array_push($_SESSION['caddie']['produit']['acompteproduit'],$acompte_prod);

                    $solde_prod = ($total_prod - $acompte_prod);
                    
                    array_push($_SESSION['caddie']['produit']['soldeproduit'],$solde_prod);
                }

   }
}
?>

(2)
<?php

function recup_panier(){

$articles = 0;

$articles = count($_SESSION['caddie']['produit']['reference']);

if (!$articles){

echo '<td align="center" colspan="6" style="text-align: center; vertical-align: middle; height: 100px;">
                        
                        <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                        <br><b>Votre Panier est vide !<br><br>
                        Cliquez sur le bouton " Retour " ci-dessous pour revenir &agrave; la page pr&eacute;c&eacute;dente, ou sur "Retour au catalogue".</b><br><br>
                        <a href = "Bordeaux.php"><span style="color: rgb(216, 0, 0); font-weight: bold;font-family: Arial;">Retour au catalogue</span></a><br>
                        </span>
        </td>';
}

else {

for ($i = 0; $articles > $i; $i++) {

echo '<tr>
        <td colspan="6">
                <table style="width: 750px;" border="0" cellpadding="0" cellspacing="0">

                <tr>
                        <td style="vertical-align: top; text-align: left;">
                                <table style="width: 750px; text-align: left;" border="0" cellpadding="0" cellspacing="2">
                                        <form method="post" action="Panier.php">
                                        <tr>
                                                
                                                <td colspan="1" rowspan="1" style="width: 4px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                        
                                                </td>
                                                
                                                
                                                <td colspan="1" rowspan="1" style="width: 175px; height: 35px; vertical-align: middle; text-align: left; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                        
                                                        <span style="color: rgb(216, 0, 0); font-weight: bold;font-family: Arial;">
                                                        <div style="margin-left: 10px;">
                                                        <small>
                                                        '.$_SESSION['caddie']['produit']['reference'][$i].'
                                                        <input type="hidden" value="'.$_SESSION['caddie']['produit']['reference'][$i].'" name="reference">
                                                        </span></small></small></div>
                                                </td>
                                                
                                                <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                        
                                                        <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                                                        <small>
                                                        <b>'.$_SESSION['caddie']['produit']['prixunitaire'][$i].'&euro;</b></small>
                                                        </span>
                                                        
                                                </td>
                                                
                                                <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                        
                                                        <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                                                        <small>
                                                        <b>'.$_SESSION['caddie']['produit']['prixactuel'][$i].'&euro;</b></small>
                                                        </span>
                                                </td>    
                                                
                                                <td colspan="1" rowspan="1" style="width: 50px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                        
                                                        <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                                                        <small>
                                                        <input value="'.$_SESSION['caddie']['produit']['quantite'][$i].'" maxlength="3" size="3" name="quantite">
                                                        </small>
                                                        
                                                </td>
                                                
                                                <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                        
                                                        <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                                                        <small>
                                                        <b>'.$_SESSION['caddie']['produit']['totalproduit'][$i].'&euro;</b></small>
                                                        </span>
                                                </td>
                                                
                                                <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                        
                                                        <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                                                        <small>
                                                        <b>'.$_SESSION['caddie']['produit']['acompteproduit'][$i].'&euro;</b></small>
                                                        </span>
                                                </td>
                             
                                                <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                        
                                                        <span style="color: rgb(255, 255, 255); font-weight: bold; font-family: Arial;">
                                                        <small>
                                                        <b>'.$_SESSION['caddie']['produit']['soldeproduit'][$i].'&euro;</b></small>
                                                        </span>
                                                </td>
                             
                                                <td colspan="1" rowspan="1" style="width: 146px; height: 35px; vertical-align: middle; text-align: right; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                                                                         
                                                        <input type="image" src="Modif_qt.jpg" name="Modifier" value="Modifier Qt">
                                                        
                                                </td>
                                        </tr>
                                </table>
                        </tr>
                        
                        <tr>
                                <td style="vertical-align: top; text-align: left;">
                                        <table style="width: 750px; text-align: left;" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                
                                                        <td colspan="1" rowspan="1" style="width: 550px; height: 20px; vertical-align: middle; text-align: left; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                  
                                                        </td>
                                                        
                                                        <td colspan="1" rowspan="1" style="width: 200px; height: 20px; vertical-align: middle; text-align: right; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                                                                                                         
                                                        <input type="image" src="Supprim_prod.jpg" name="RisetteProd" value="Supprimer ce produit">
                                                        </form>
                                                        </td>
                                                </tr>
                                        </table>
                                </td>                                
                        </tr>
                        
                </table>
        </td>                                                                       
</tr>';

}
}

}
?>


Posté : 01 déc. 2005, 00:19
par Cyrano
Première suggestion, aligner ton code de façon lisible. Ensuite, ne pas mélanger inutilement HTML et PHP :
Premier code:
<?php
if (isset($_POST["Commander"]))
{
    $refprod = $_POST["reference"];
    $qt = $_POST["quantite"];
    $pu = $_POST["prixunitaire"];
    $pa = $_POST["prixactuel"];

    require_once('deja.php');

    if(!verif_panier($refprod))
    {
        //vérification de la validité des données du formulaire //
        if(!is_numeric($qt))
        {
            require_once('qt_non_num.php');
            exit();
        }
        else
        {
            array_push($_SESSION ['caddie']['produit']['quantite'],$qt);
            array_push($_SESSION ['caddie']['produit']['reference'],$refprod);
            array_push($_SESSION['caddie']['produit']['prixunitaire'],$pu);
            array_push($_SESSION['caddie']['produit']['prixactuel'],$pa);

            $total_prod = ($qt * $pa);

            array_push($_SESSION['caddie']['produit']['totalproduit'],$total_prod);

            $acompte_prod = (($qt * $pu) / 2);

            array_push($_SESSION['caddie']['produit']['acompteproduit'],$acompte_prod);

            $solde_prod = ($total_prod - $acompte_prod);

            array_push($_SESSION['caddie']['produit']['soldeproduit'],$solde_prod);
        }
    }
}
?>
Second code:
<?php
function recup_panier()
{
    $articles = count($_SESSION['caddie']['produit']['reference']);
    if ($articles < 1)
    {
?>
  <td align="center" colspan="6" style="text-align: center; vertical-align: middle; height: 100px;">
    <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
    <br><b>Votre Panier est vide !<br><br>
    Cliquez sur le bouton " Retour " ci-dessous pour revenir à la page précédente, ou sur "Retour au catalogue".</b><br><br>
    <a href = "Bordeaux.php"><span style="color: rgb(216, 0, 0); font-weight: bold;font-family: Arial;">Retour au catalogue</span></a><br>
    </span>
  </td>
<?php
    }
    else
    {
        for ($i = 0; $articles > $i; $i++)
        {
?>
  <tr>
    <td colspan="6">
      <form method="post" action="Panier.php">
        <table style="width: 750px;" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td style="vertical-align: top; text-align: left;">
              <table style="width: 750px; text-align: left;" border="0" cellpadding="0" cellspacing="2">
                <tr>
                  <td colspan="1" rowspan="1" style="width: 4px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                  </td>
                  <td colspan="1" rowspan="1" style="width: 175px; height: 35px; vertical-align: middle; text-align: left; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <span style="color: rgb(216, 0, 0); font-weight: bold;font-family: Arial;">
                    <div style="margin-left: 10px;">
                    <small><?php echo($_SESSION['caddie']['produit']['reference'][$i]); ?>
                    <input type="hidden" value="<?php echo($_SESSION['caddie']['produit']['reference'][$i]); ?>" name="reference">
                    </span></small></small></div>
                  </td>
                  <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                    <small>
                    <b><?php echo($_SESSION['caddie']['produit']['prixunitaire'][$i]); ?>&euro;</b></small>
                    </span>
                  </td>
                  <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                    <small>
                    <b><?php echo($_SESSION['caddie']['produit']['prixactuel'][$i]); ?>&euro;</b></small>
                    </span>
                  </td> 
                  <td colspan="1" rowspan="1" style="width: 50px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                    <small>
                    <input value="<?php echo($_SESSION['caddie']['produit']['quantite'][$i]); ?>" maxlength="3" size="3" name="quantite">
                    </small>
                  </td>
                  <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                    <small>
                    <b><?php echo($_SESSION['caddie']['produit']['totalproduit'][$i]); ?>&euro;</b></small>
                    </span>
                  </td>
                  <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <span style="color: rgb(255, 255, 255); font-weight: bold;font-family: Arial;">
                    <small>
                    <b><?php echo($_SESSION['caddie']['produit']['acompteproduit'][$i]); ?>&euro;</b></small>
                    </span>
                  </td>
                  <td colspan="1" rowspan="1" style="width: 75px; height: 35px; vertical-align: middle; text-align: center; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <span style="color: rgb(255, 255, 255); font-weight: bold; font-family: Arial;">
                    <small>
                    <b><?php echo($_SESSION['caddie']['produit']['soldeproduit'][$i]); ?>&euro;</b></small>
                    </span>
                  </td>
                  <td colspan="1" rowspan="1" style="width: 146px; height: 35px; vertical-align: middle; text-align: right; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <input type="image" src="Modif_qt.jpg" name="Modifier" value="Modifier Qt">
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td style="vertical-align: top; text-align: left;">
              <table style="width: 750px; text-align: left;" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td colspan="1" rowspan="1" style="width: 550px; height: 20px; vertical-align: middle; text-align: left; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                  </td>
                  <td colspan="1" rowspan="1" style="width: 200px; height: 20px; vertical-align: middle; text-align: right; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
                    <input type="image" src="Supprim_prod.jpg" name="RisetteProd" value="Supprimer ce produit">
                  </td>
                </tr>
              </table>
            </td> 
          </tr>
        </table>
      </form>
    </td> 
  </tr>
<?php
        }
    }
}
?>
Dans ce dernier code, j'ai corrigé un ou deux détails dans le html: la balise <form ne peut pas commencer n'importe où ni finir de la même manière: les balises html ne peuvent pas s'imbriquer dans n'importe quel ordre. Et il manquait une balise de fermeture </td>

Posté : 01 déc. 2005, 16:31
par alcofribas
Merci, j'ai rectifié les scripts, mais ça ne fontionne toujours pas.
En fait je me rends compte que la tableau que j'appelle dans mon panier est vide... Sauf bien sûr session_id et la date.
Je crois donc que le script qui ne convient pas à IE est le premier...[/php]

Posté : 01 déc. 2005, 22:05
par alcofribas
Alors, pas d'idées :( ?

Posté : 01 déc. 2005, 22:07
par jeff
salut
apparement ca depend de ton navigateur
essaye de mettre le niveau de securité au plus bas sur ie
et refet des testes

Posté : 02 déc. 2005, 13:44
par alcofribas
C'est ce que j'ai cru en premier pcq c'est quelqu'un qui est entré sur ma page avec IE et qui m'a signalé le problème. Je lui ai dit de vérifier ses cookies et son niv de sécurité mais rien.
J'y suis allé avec explorer, que je n'utilise jamais, et j'ai le même pb.
Voici le formulaire qui doit envoyer mes variables récupérées par le script (1).
<form method="post" action="Panier.php">
        <table style="width: 750px;" border="0" cellpadding="0" cellspacing="0"> 
                  <tr>
                          <td style="vertical-align: top; text-align: left;">
                                   <table style="width: 750px; text-align: left;" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                   <td colspan="1" rowspan="1" style="width: 215px; vertical-align: middle; text-align: left; font-family: Arial; font-weight: bold; color: rgb(255, 255, 255);">
       <div style="margin-left: 20px;">
       <span style="color: rgb(255, 255, 255); font-weight: bold; text-decoration: underline;">
       <?php
       require('refprod.php');
       echo '<input type="hidden" value="'.$refprod.'" name="reference">'.$refprod;
       ?>
       </small>
       </div>
</td>

<td rowspan="1" style="width: 535px; text-align: left;" valign="top">
                                                                             
        <table style="width: 535px; text-align: left;" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                                <td>
                                <br>
                                </td>
                        </tr>
                        <tr>
                                <td style="width: 145px; height: 20px; vertical-align: center; text-align: center; font-family: Arial; background-color: rgb(102, 0, 58); color: rgb(216, 0, 0); font-weight: bold;">
                                        <small>Temps restant</small>
                                </td>
                                
                                <td style="width: 90px; height: 20px; vertical-align: center; text-align: center; font-family: Arial; background-color: rgb(85, 0, 48); color: rgb(216, 0, 0); font-weight: bold;">
                                        <small>Prix initial</small>
                                </td>
        
                                <td style="width: 102px; height: 20px; vertical-align: center; text-align: center; font-family: Arial; background-color: rgb(85, 0, 48); color: rgb(216, 0, 0); font-weight: bold;">
                                        <small>Prix actuel</small>
                                </td>
        
                                <td style="width: 198px; height: 20px; vertical-align: center; text-align: center; font-family: Arial; background-color: rgb(71, 0, 40); color: rgb(216, 0, 0); font-weight: bold;">
                                        <small>Quantit&eacute;s actuelles cumul&eacute;es</small>
                                </td>
                        </tr>
                        
                        <tr>
                                <td style="width: 145px; height: 22px; vertical-align: center; text-align: center; font-family: Arial; color: rgb(255, 255, 255); font-weight: bold;">
                                        <?php
                                        require('w_ti.php');
                                        echo '<small>'.$nb_days.'&nbsp;jour(s)&nbsp;'.$nb_hours.'h&nbsp;et&nbsp;'.$nb_mins.'mn</small>';
                                        ?>
                                </td>
                                
                                <td style="width: 90px; height: 22px; vertical-align: center; text-align: center; font-family: Arial; color: rgb(255, 255, 255); font-weight: bold;">
                                        <?php
                                        require('ac_px.php');
                                        echo '<small>'.$pu.'&nbsp;&euro;</small><input type="hidden" value="'.$pu.'" name="prixunitaire">';
                                        ?>
                                </td>
                                
                                <td style="width: 102px; height: 22px; vertical-align: center; text-align: center; font-family: Arial; color: rgb(255, 255, 255); font-weight: bold;">
                                        <?php
                                        echo '<span style="color: rgb(216,0,0)"><small>'.$pa.'&nbsp;&euro;</small></span><input type="hidden" value="'.$pa.'" name="prixactuel">';
                                        ?>
                                </td>
                                
                                <td style="width: 198px; height: 22px; vertical-align: center; text-align: center; font-family: Arial; color: rgb(255, 255, 255); font-weight: bold;">
                                        <?php
                                        require('actu_qt.php');
                                        ?>
                                </td>
                            </tr>
                      </table>
                 </tr>
             </td>
        </tr>
     </table>
   </td>
 </tr>
 <tr>
<td style="width: 300px; vertical-align: middle; text-align: right; color: rgb(255, 255, 255); font-family: Arial; font-weight: bold;">
        
        <small>Quantit&eacute;s souhait&eacute;es :</small>
        <input maxlength="3" size="3" name="quantite">
        
</td>

<td style="width: 200px; vertical-align: middle; text-align: right; color: rgb(255, 255, 255); font-weight: bold;">

        <div style="margin-left: 10px;">
        <span style="color: rgb(255, 255, 255); font-weight: bold;">
        <input type="image" src="Commander.jpg" name="Commander" value="Commander">
        </div>
              
</td>
 </tr>
</table>
</form>
Ce code est appelé dans une page plusieurs fois pour plusieurs produits différents.
J'ai essayé d'encadrer ces différents bloques par une seule balise <form>, mais ça ne fonctionne plus nulle part dans ce cas.

Posté : 02 déc. 2005, 22:20
par alcofribas
en faisant print_r($_POST); je m'aperçois que les données sont bien là sur Netscape et sur IE.
Ce qui me fait croire que ce qui ne fonctionne pas avec Netscape c'est la série d'array_push dans mon code, ou plus simplement que la formulation des conditions n'est pas comprise par IE... :?

Posté : 03 déc. 2005, 21:39
par alcofribas
et si je vous dis que var_dump($_POST) retourne aussi qqc comme [commande_x] => 17 [commande_y] => 87, ça ne vous aide pas ?
J'ai essayé de remplacer array_push par $_SESSION[...] = $var et ça ne fonctionne pas plus :evil:
C'est une histoire de digne non?
Comme je peux voir ce qui cloche? Un dégoguer en ligne ? un test que je ne connais pas ?
Mon site dois sortir mardi, je ne sais plus quoi faire.

Posté : 04 déc. 2005, 00:48
par Cyrano
et si je vous dis que var_dump($_POST) retourne aussi qqc comme [commande_x] => 17 [commande_y] => 87, ça ne vous aide pas ?...
Ça, ce sont les données envoyées par un bouton de type image.
Ce qui me fait croire que ce qui ne fonctionne pas avec Netscape c'est la série d'array_push dans mon code
Tu semble oublier un détail: le PHP n'est pas interprété coté client mais coté serveur: le problème est donc forcément ailleur puisque selon ta programmation, les mêmes éléments seront envoyés au navigateur quel qu'il soit.

Posté : 04 déc. 2005, 16:10
par alcofribas
alors comment expliques-tu qu'un même code fonctionne avec certains navigateurs et pas avec un en particulier?
est-ce que ce serait quelquechose à modifier ds mon php.ini?
mais je reviens à ma question: est-ce qu'il y a une particularité à IE ou est-ce que mon problème semble théoriquement une impossibilité?


Rectification: c'est bien avec IE que ça ne fonctionne pas et non avec Netscape.

Posté : 04 déc. 2005, 16:16
par Cyrano
Ce que tu dois vérifier, ce n'est pas ce qu'il y a dans ton PHP mais les données HTML/JavaScript/CSS que tu envoies au navigateur et qui, selon le cas, peuvent être interprétées différement. Au niveau des session, le seul lien un peu direct est au niveau du réglage selon le navigateur du degré d'acceptation des cookies puisque les système gérant les session au niveau serveur envoie des cookies au navigateur. Tu pourrais t'en passer en ajustant ton php.ini avec la directive trans_sid à ON, ce qui ferait suivre l'id de session en paramètre dans les url. Mais ce n'est pas une solution souhaitable.

Posté : 05 déc. 2005, 15:52
par alcofribas
A propos de code html, on me dit que si j'utilise une image comme bouton submit ne génère pas de variable $_POST indiquant l'utilisation de celle-ci: ce qui voudrait dire qu'en effet ma structure de test de l'autre côté ne voit tout simplement pas $_POST['Commander'].
Est-ce vrai? Dans ce cas, je tombe sur un pb d'esthétique, beaucoup moins grave: comment rendre un bouton submit un peu moins laid?

Posté : 05 déc. 2005, 15:58
par alcofribas
Après essai, je confirme: le problème était bien celui-là.
Peut-être devrait-on basculer la conversation vers la section html pour aborder le sujet esthétique? Qu'en pense la modération?

Posté : 05 déc. 2005, 18:00
par Cyrano
Ça se justifie effectivement, sujet déplacé.

Posté : 05 déc. 2005, 18:42
par alcofribas
Donc, je renouvelle ma question: comment faire pour obtenir un bouton submit qui ne ressemble pas à un méchant rectangle blanc qui prend la taille qu'il veut?