if (!$conn2 = new COM("ADODB.Connection")) exit("Unable to create an ADODB connection<br>"); $strConn2 = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("db\kap.mdb"); $conn2->open($strConn2); $strSQL2 = "SELECT Ip, Artikelnr, Antal FROM Best where Ip='$SESSID'"; $rs2 = $conn2->execute($strSQL2); $Ip = $rs2->Fields(0); $Art = $rs2->Fields(1); $Ant = $rs2->Fields(2); while (!$rs2->EOF) { if($Ip->value==$SESSID){ /* ------------------------------------------------------------------------- -------------------------------------------- */ if (!$conn = new COM("ADODB.Connection")) exit("Unable to create an ADODB connection<br>"); $strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("db\webdb.mdb"); $conn->open($strConn); $strSQL = "SELECT Kategori, Produkt, Pris, Artikelnr, Lagerstatus, Beskrivning, Bild FROM Data where Artikelnr='$Art->value'"; $rs = $conn->execute($strSQL); $Kategori = $rs->Fields(0); $Produkt = $rs->Fields(1); $Pris = $rs->Fields(2); $Artikelnr = $rs->Fields(3); $Lagerstatus = $rs->Fields(4); $Beskrivning = $rs->Fields(5); $Bild = $rs->Fields(6); $Totalpris=$Pris->value * $Ant->value; $Totalprisalla = $Totalpris + $Totalprisalla; echo "<OPTION>$Ant->value st $Produkt->value</OPTION>"; $rs->Close(); $conn->Close(); $rs = null; $conn = null; /* ------------------------------------------------------------------------- -------------------------------------------- */ } $rs2->MoveNext(); } $rs2->Close(); $conn2->Close(); $rs2 = null; $conn2 = null; } $A = 1.25; $TotalprisInkmoms = $Totalprisalla * $A; if($TotalprisInkmoms<>"0"){ echo " <OPTION></OPTION> <OPTION>Ex.moms $Totalprisalla KR</OPTION> <OPTION>Ink.moms $TotalprisInkmoms KR</OPTION>"; } if($TotalprisInkmoms=="0"){ echo " <OPTION>Du har inga varor i kundvagnen!</OPTION>"; } ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php