thanks a lot people for your help.
i think i'm in the right track now, but there are still some little things i need to improve.
i have a function to pull the each component options of the database, then when submited i have a loop to show the results and the sum of all their prices, but i need to change this loop to show the components selected in the order they are asked, now they are showing in the order they are found in the table and i need the processor first, then the memory, etc...
but now i have encountered a new problem, and a big one. if you choose the platform with RIMM memory these can only be used in pairs, how can show 2 RIMMS and do the sum of the prices with these two RIMMS in this loop?
function verComponente($processador, $memoria, $motherboard, $disco, $cdrom, $dvd, $disquetes, $placasom, $placagrafica, $monitor, $colunas, $teclado, $rato, $sistema) {
$sql = "SELECT * FROM produtos WHERE cod='$processador' OR cod='$memoria' OR cod='$motherboard' OR cod='$disco' OR cod='$cdrom' OR cod='$dvd' OR cod='$disquetes' OR cod='$placasom' OR cod='$placagrafica' OR cod='$monitor' OR cod='$colunas' OR cod='$teclado' OR cod='$rato' OR cod='$sistema'";
$rs=$this->bd->executarSQL($sql);
$n = 0;
$total = 0;
while(mysql_fetch_row($rs)) {
echo "<b>".mysql_result($rs, $n, "categoria")." : </b>".mysql_result($rs, $n, "marca")." ".mysql_result($rs, $n, "modelo")." - <b>".mysql_result($rs, $n, "preco")." €</b><br>";
$total += mysql_result($rs, $n, "preco");
$n++;
}
echo "<div align=\"right\"><font size=+1><b>Total: $total €</b></font></div>";
}
any though could be of great help at this time.
Thanks in advance.