J'ai une liste déroulante pour me permettre de trier les valeurs que j'affiche et je voudrais savoir comment on utilise les valeurs pour me permettre de trier ce qui est affiché sur la page.

Ca ne doit pas être compliqué mais j'y arrive pas.

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
<?php
if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
 <?php /*<div id="splitPageTop">
   <p class="sP1"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></p> 
   <p class="sP2"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
 </div>
*/ ?>
<?php
}
?>
<br><br><br>
<font size="2"><?php echo "Trier par :" ?></font>
       <select name="path">
	    <option value="select">--Selectionnez--</option>
        <option value="nom">Nom</option>
        <option value="rendement">Rendement</option>
        <option value="dimension">Dimension</option>
        <option value="puissance">Puissance</option>
        <option value="prix">Prix</option>
        <option value="fournisseur">Fabricant</option>
    </select><br><br><br>	
<?php
  if ($listing_split->number_of_rows > 0) {
    $listing_query = tep_db_query($listing_split->sql_query);
     while ($listing = tep_db_fetch_array($listing_query)) {
?>
<div class="listing">
<div class="listingTop"></div>
    <dl>
      <dt><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, (isset($_GET['manufacturers_id']) ? 'manufacturers_id=' . $_GET['manufacturers_id'] . '&amp;' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>' ;?></dt>
<?php
     if (tep_not_null($listing['products_image']) && PRODUCT_LIST_IMAGE == '1') {
?>
    <dd class="productImage">
     <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, (isset($_GET['manufacturers_id']) ? 'manufacturers_id=' . $_GET['manufacturers_id'] . '&amp;' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>' ; ?>
    </dd>
<?php
 }
?>
<?php
     if (tep_not_null($listing['products_image1']) && PRODUCT_LIST_IMAGE == '1') {
?>
    <dd class="productImage1">
     <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, (isset($_GET['manufacturers_id']) ? 'manufacturers_id=' . $_GET['manufacturers_id'] . '&amp;' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image1'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>' ; ?>
    </dd>
<?php
 }
?>
<?php
     if (tep_not_null($listing['products_model']) && PRODUCT_LIST_MODEL == '1') {
?>
      <dd class="productModel"><?php echo '<span>' . TABLE_HEADING_MODEL.'</span> ' . $listing['products_model'] ;?></dd>
<?php
 }
 if (tep_not_null($listing['manufacturers_name']) && PRODUCT_LIST_MANUFACTURER == '1') {
?>
      <dd class="productManufacturer">
      <?php echo '<span>' . TABLE_HEADING_MANUFACTURER.'</span> ' . '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a>' ;?>
      </dd>
<?php
 }
     if (tep_not_null($listing['products_price']) && PRODUCT_LIST_PRICE == '1') {
?>
      <dd class="productPrice">
      <span><?php echo TABLE_HEADING_PRICE ;?></span>
<?php
     if (tep_not_null($listing['specials_new_products_price'])) {
       echo '<del>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</del>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
     } else {
       echo $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) ;
     }
?>
     </dd>
<?php
 }
     if (tep_not_null($listing['products_quantity']) && PRODUCT_LIST_QUANTITY == '1' ) {
?>
      <dd class="productQuantity"><?php echo '<span>' . TABLE_HEADING_QUANTITY . '</span> ' . $listing['products_quantity'] ;?></dd>
<?php
 }
     if (tep_not_null($listing['products_weight']) && PRODUCT_LIST_WEIGHT == '1') {
?>
      <dd class="productWeigth"><?php echo '<span>' . TABLE_HEADING_WEIGHT . '</span> ' . $listing['products_weight'] ;?></dd>
<?php
 }
     if ( PRODUCT_LIST_BUY_NOW == '1' ) {
?>
    <dd class="listingBuy">
    <?php
      echo tep_draw_form('cart_quantity'.$listing['products_id'], tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=add_buy_now'));
      echo tep_draw_hidden_field('products_id', $listing['products_id']);
      echo TEXT_PREFIX_QTY.tep_draw_input_field('products_quantity', 'products_quantity'.$listing['products_id'], '1', 'size="2"');
    ?>
      <input class="submitBt" type="submit" value="<?php echo IMAGE_BUTTON_IN_CART; ?>"  />
      </form>
    </dd>
	<?php
 }
?>
    </dl>
    <div class="listingBottom"></div>
</div>
<?php
  }
  } else {
?>
    <div class="infoText"><?php echo TEXT_NO_PRODUCTS ;?></div>
<?php
  }
  if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
?>
 <div id="splitPageBottom">
   <p class="sP1"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></p>
   <p class="sP2"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
 </div>
<?php
  }
?>