I guess I need to clarify things a bit.
I am working with up to 25 lines on the tabular form. Thus the need for seperate arrays. What I am trying to do is inspect the value of $o. If it returns 0(zero) I would need to stop and advance the array pointers by one. The do-while loop currently breaks when (in 'while') the value of $qr equates to 0(zero). Remember that $o = current($qr)
I am also pulling in the arrays and their data via $_GET
Perhaps I am misunderstanding what Weedpacket wrote. I tried to adjust my code but it grew immensely using 'foreach'. The current script is small and thats a design goal that I need to follow.
Here is the entire script:
<?
Session_start();
header("Cache-control: private");
include_once("../xxx.php");
include_once("../xxxxx.php");
include_once("../xxxx.php");
$success = "xxxx.html";
$customer=$SESSION['customer'];
$orion=$GET['or'];
$rid=$GET['rid'];
$qoh=$GET['qoh'];
$qr=$GET['qr'];
$qo=$GET['qo'];
$quote=$GET['quote'];
$po=$GET['po'];
$pod=$GET['pod'];
$poed=$GET['poed'];
$lpr=$GET['lpr'];
$unwd=$GET['unwd'];
$core=$GET['core'];
$material=$GET['material'];
$bin=$GET['bin'];
$status=$GET['status'];
//echo "<hr /><pre>";print_r($_REQUEST); echo "</pre><hr />";
//Connect to the database server
//mysql_connect("localhost","$USERNAME","$PASSWORD") or die ("can not connect");
include "xxxxxxx.php";
//Change to the database
mysql_select_db ("$xxxxxx") or die ("Could not select database");
do
{
$b = current($rid);
$c = current($qoh);
$o = current($qr);
$n = current($qo);
$d = current($quote);
$e = current($po);
$f = current($pod);
$g = current($poed);
$h = current($lpr);
$i = current($unwd);
$j = current($core);
$k = current($material);
$l = current($bin);
$m = current($status);
$diff = ($c - $o);
//echo $diff;
//echo "The next element group is: $b, $c, $d, $e, $f, $g,$h, $i, $j, $k, $l, $m, $n, $o, $diff .";
//The query
$query="UPDATE inventory SET `Current_Quote`='$d',`Qty_On_Hand`='$diff',`Qty_Ordered`='$n',`Bin_Location`='$l',`Unwind_Direction`='$i',`Labels_Per_Roll`='$h',`Core_Size`='$j',`Material`='$k',`Status`='$m',`PO_Date`='$f',`PO_Exp_Date`='$g',`PO_Number`='$e' WHERE `rowID`='$b'";
$result=mysql_query($query);
}while(next($rid) && next($qoh) && next($qr) && next($qo) && next($quote) && next($po) && next($pod) && next($poed) && next($lpr) && next($unwd) && next($core) && next($material) && next($bin) && next($status));
?>
Most (if not all) 'echo' are there for troubleshooting.
Thank you in advance for your time and effort with this matter,
Omen