So I have an input text that is used to determine the amount of the purchase of item in my shopping cart. Each item has a different maximum amount of purchases, the maximum number of purchases (max) is obtained from the mysql database. I want if user input the number of items exceeds the maximum limit, then a warning appear.
The shopping chart and the amount :
The database example:
id_item | item | brands | max
- - - - - - - - - - - - - - - - - - - - - - -
1 | Baskom Sedang | Lion Star |2
2 | Pinset Anatomi| Selako |5
3 | Tromol | Selako |7
So for example if i type 3 in the "Baskom sedang" amounts (exceeding max limits), i want alert to appear.
I know I'm supposed to include a javascript/code that I try, but I do not have any idea about the javascript, i'm not good with javascript. Thank you..