Ok guys i've got 2 pages, The first one is a form that the user is gonna fill up ... and then, writes in a session and then sends this info to a second page ...
The problem i've got is that if a product is added he will only take the last select box that is filled ... i'd like him to show me the info for each select box that appears for each products ... not only the last one !
Any idea ?
that's the first page :
<?php
$items = explode(" ",$_SESSION['cpItems']);
$quantity = explode(" ",$_SESSION['cpQuantity']);
$subtotal = 0;
$shipping = 0;
$handling = 0;
$total = 0;
$itemid = "";
$numitems = sizeof($items);
if (sizeof($items) == 0 || trim($_SESSION['cpItems']) == "")
echo "";
else {
while (list($i,$value) = each($items)) {
if ($value != "") {
$product = mysql_query("select * from {$config['prefix']}Products where id='{$items[$i]}'");
$data = mysql_fetch_array($product);
echo "<tr><td width=\"300\" align='right'><a href=\"product.php?p={$items[$i]}\" " .
"target=\"_blank\">{$data['name']}</a></td>";
echo "<td width=\"300\"><select name='comments2' size=1 value='";
echo (isset($_SESSION['cpPaymentConf'])) ? $_SESSION['cpPaymentConf'] : "";
echo "'>
<option>5- Filtre papier</option>
<option>1- Turque (très fin, poudre)</option>
<option>2-</option>
<option>3- Expresso</option>
<option>4-</option>
<option>6- Filtre permanent</option>
<option>7- Bodum</option>
<option>8-</option>
<option>9- Percolateur (grossière)</option>
<option>10- En grain</option>
</select></td></tr>";
Heres the second page that shows the info :
<?php echo ($_SESSION['cpPaymentInfo']['comments2']); ?>