The question is very simple, I have 10 text boxes in a form where the user can type the quantity of a product to request. But since I dont wanna allow to enter characters, only numbers >= 1, I'm checking the condition with this code (the quantity of the product requested coming from the form is stored in the array $products_cant):
Code: Select all
for ($i=0; $i<=9; $i++)
{
if (is_int($products_cantї$i]))
{
if ($products_cantї$i] >= 1)
{ $GO = 1; }
else
{ $GO = 0; }
}
else
{$GO = 0;}
}If the variable $GO = 0 this will be the indicator (or what some people calls flag right
I already did the validation at the client side (browser) using a javascript that volka passed me (thx again volka
Thx for ur help
