Nieuw lid |
|
dit is de code die ik heb.
<?php
if ($_POST['artikelen'])
{
$query = "SELECT * FROM artikelen WHERE levprodcode = '$_POST[levprodcode]' ";
$result = mysql_query($query) or die(mysql_error());
echo"<table> lev: {$_POST[levprodcode]}</table>";
while ($show = mysql_fetch_array($result))
{
$pr = number_format(roundprijs(prijsinc(100,$show['verkoopex'],$show['verkoopminex'],$show['btwtarief'])),2,".","");
$levernr = $show['leveranciernummer'];
$levprod = $show['levprodcode'];
$vendor = $show['vendorpartnr'];
$omsch = $show['omschrijving'];
$merk = $show['merk'];
$sql = "SELECT ISNULL (MAX (positienummer), 0) AS 'MAX' FROM winkelwagenregels WHERE winkelwagennummer = '$_SESSION[sess_winkelwagennr]' ";
$res = mysql_query($sql) or die(mysql_error());
while ($shown = mysql_fetch_array($res))
{
$positie = $shown['positienummer'];
echo"pos: $positie";
}
// $sql = "INSERT INTO winkelwagenregels (winkelwagennummer, positienummer, merk, omschrijving, vendorpartnr, apn, leveranciernr, aantal, stuksprijs) VALUES
// ('$wagennr', '$aantal', '$merk', '$omsch', '$vendor', '$levprod', '$levernr', '$val', '$pr')";
// $resultaat = mysql_query($sql) or die (mysql_error());
}
}
?>
<?php if ($_POST['artikelen']) { $query = "SELECT * FROM artikelen WHERE levprodcode = '$_POST[levprodcode]' "; echo"<table> lev: {$_POST[levprodcode]}</table>"; { $pr = number_format(roundprijs (prijsinc (100,$show['verkoopex'],$show['verkoopminex'],$show['btwtarief'])),2,".",""); $levernr = $show['leveranciernummer']; $levprod = $show['levprodcode']; $vendor = $show['vendorpartnr']; $omsch = $show['omschrijving']; $merk = $show['merk']; $sql = "SELECT ISNULL (MAX (positienummer), 0) AS 'MAX' FROM winkelwagenregels WHERE winkelwagennummer = '$_SESSION[sess_winkelwagennr]' "; { $positie = $shown['positienummer']; } // $sql = "INSERT INTO winkelwagenregels (winkelwagennummer, positienummer, merk, omschrijving, vendorpartnr, apn, leveranciernr, aantal, stuksprijs) VALUES // ('$wagennr', '$aantal', '$merk', '$omsch', '$vendor', '$levprod', '$levernr', '$val', '$pr')"; // $resultaat = mysql_query($sql) or die (mysql_error()); } } ?>
|