Eyescream ecco il tutto
Codice PHP:
$query1 "SELECT * FROM ordini where ID = '$PHPSESSID' ORDER BY prodotto";
echo 
$query1."\n";
$dati1 mysql_query($query1$DB) or die(mysql_error());
while(
$row1 mysql_fetch_array($dati1)){
    
var_dump($row1);
    if(
$row1[2] ==""){
        echo
"<span class=togli>Nessun prodotto selezionato!</span>

"
;
    }else{
            echo
"<td width=40% align left class=testounico>$row1[2]</td>
       <td width=20% align=right class=testounico>
$row1[3] euro</td>
       <td width=20% align=right class=testounico>
$row1[4]</td>
       <td width=30% align=right class=testounico>
$row1[5] euro</td>";
    }


SELECT * FROM ordini where ID = 'e7a1aa971908ebf2bef9d58707c0d701' ORDER BY prodotto array(14) { [0]=> string(3) "836" ["idm"]=> string(3) "836" [1]=> string(32) "e7a1aa971908ebf2bef9d58707c0d701" ["ID"]=> string(32) "e7a1aa971908ebf2bef9d58707c0d701" [2]=> string(10) "finocchina" ["prodotto"]=> string(10) "finocchina" [3]=> string(1) "3" ["quantita"]=> string(1) "3" [4]=> string(6) " al kg" ["modalita"]=> string(6) " al kg" [5]=> string(4) "2.40" ["totale"]=> string(4) "2.40" [6]=> string(4) "0.80" ["prezzo"]=> string(4) "0.80" }
come vedi è tutto ok!