After 3 weeks of trying, I still can't seem to get my head around this one.
Using foreach($_POST as $var => $value), I get an array.
It's an array of a list of part numbers and their quantities. The first 3 alphabetical characters are disregarded. However, the numbers following the first three letters is the actual part number, followed by the quantity.
Example:
abc111 => 5
bcd222 => 9
abc444 => 1
def111 => 0
efg222 => 3
def444 => 0
Using the array above, there are:
five of the 111's
twelve of the 222's
one of the 444's
What I want to accomplish is an "alert" system that if the quantity exceeds 10, an error message is generated. Using the above example, there are TWELVE of the 222's, so I'd want the script to immediately exit and generate an error message to the visitor that
I'm sure there's an easy way... 🙂
Thank you!!