Hello to everyone,
This is more understandable
[php]
<?php
while ($row = $ayristiricilar->fetch_assoc()) {
?>
[/php]
I list products like in picture with the sample code above.
See: http://o1307.hizliresim.com/1c/9/q213x.png
<?=$row['product_name']?>
<?php
}
?>
How can I receive IDs and amounts of products entered amounts on next page?
[php]
$_SESSION[‘diplexer_id’] = $_REQUEST[‘diplexer_id’];
$_SESSION[‘diplexer_amunt’] = $_REQUEST[‘diplexer_amunt’];
[/php]
I want help just two issue: div table and next page.
My table that record these is like below.
[php]
// $id=$kayitid=$mysqlibag->insert_id;
$id=12; //This main record table ID
for($i=0; $i<count($_SESSION['diplexer_id']); $i++) {
$diplexer_id[] = $_SESSION['diplexer_id'][$i];
$diplexer_amount[] = $_SESSION['diplexer_amunt'][$i];
}
$values = array();
for($i=0; $i<count($diplexer_id); $i++) {
$values[]="({$id}, {$diplexer_id[$i]}, {$diplexer_amount[$i]})";
}
$diplexer_id_amount=$mysqlibag->query("INSERT INTO diplexer_amounts (`id`, `diplexer_id`, `diplexer_amount`) VALUES " . implode(", ", $values));
if (!$diplexer_id_amount)
{
die(mysql_error());
}
[/php]
MySQL Table:
[php]
id diplexer_id diplexer_amount
12 34 3
12 23 1
12 78 4
12 12 2
12 9 1
[/php]
Many thanks in advance