Kawish Behzad Kawish Behzad - 3 months ago 9
Javascript Question

Point Per Total Price System

im trying to build something almost like a cashier system with php jquery and html
so im confuse about the point system
i got a simple input here :The input form

so the user will input their total price and base on that they'll get point ,
so for example user will get 1 poin every $10 , so when the user input $15 he's got 1 poin , and when the user input $13, he's still got 1 point, but when user input $20, he's gonna get 2 point , so thats basically thats how the system work, and my question is how to achieve that kind of system with php

sorry for my bad english , thanks for your help

Answer

you can use:

$points = floor($price/10);
Comments