I am trying to create a php page that shows status of inventory by using conditions within the CSS class.
I have a mysql database that will provide invID, lotnumber & status
Status data will be sold, uc or avail
when the page loads, I want to query the inventory table and put the result into an array.
Within the UI, I have a layer div tag where I want each object to decide, based on array data, which css class should be parsed (sold or avail)
<span class="<?php
$status=$row_Recordsetinv['status'];
if ($status =="sold"){
echo "sold";
}
elseif ($status == "uc"){
echo "sold";
} else {
echo "avail";
}
?>">
My trouble is how to reach into the array, extract a specific row, check it's status and then use that status in the if, elseif statement.
I have made a prototype work with a specific lotnumber query, but I obviously don't want to code 100 different queries to account for each inventory item.
So, I want to load an array that contains invID, lotnumber & status, then use the array to extract status for a particular lotnumber, then use the status in the above condition.
I would need to replicate the extraction at each layer (inventory display) on the page.
Thanks