Code: Select all
while($row = mysql_fetch_array($ItemSet)) {
$BigBrother = "INSERT INTO orderhistory (datetime, legalname, title, degree, body, email, phone, address, city, state, zip, totalcost, paymethod,";
for($n = 0; $n = count($row[5]); $n++) {
$BigBrother .= " item" . $n . ","; }
for($q = 0; $q = count($row[3]); $q++) {
$BigBrother .= " qty" . $q . ","; }
$BigBrother .= ") VALUES ('$date', '$name', '$title', '$degree', '$body', '$email', '$phone', '$addr" . " $addr2', '$city', '$state', '$zip', '$total', '$method',";
foreach($row[5] as $name) {
$BigBrother .= "\'" . $name . "\',"; }
foreach($row[3] as $qty) {
$BigBrother .= "\'" . $qty . "\',"; }
$BigBrother .= ")";
global $BigBrother;
}feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]