1) Pool: These are lists of product names and quantities (can by any number of these boxes as they are dynamically added and removed by the user)
2) Total: This textbox totals all of the product names and quantities in the Pool.
3) To Do: This textbox contains a "to do list" of changes that need to be made overall in the Pool.
I have everything displaying properly and pulling data from my database, but I cannot get the Total and To Do textboxes to operate properly when the user hits a refresh button. Below is my first attempt at making sense of this problem. I am having a lot of difficulty figuring this out and any suggestions would be greatly appreciated.
Code: Select all
<?php
include("include/session.php");
$productQty = explode("\n", $_REQUEST['productQty']);
$productList1 = explode("\n", $_REQUEST['productList1']);
$productList2 = explode("\n", $_REQUEST['productList2']);
$everything = array();
$everything = $productList1;
$numLoads = 2;
function addCommon()
{
$result = array_intersect($productList2, $everything);
print_r(array_keys($result, "blue"));
}
for($i = 2; $i <= $numLoads; $i++)
{
addCommon();
addDiff();
}
?>