Hi !
I'm chking the txtbox field value after a user submits the form dat it is numeric & has just one decimal point.
if (!eregi("[0-9]*\.[0-9]{2,2}$", $bkprice)) $msg = $msg. "<li>Invalid Book Price</li>";
E.g: If a person enters 23.56
Its ok, work fine! N it will take only 2 places decimal & only one decimal i.e. it should not b 23.56.34 else it will show an error
Now the problem comes whn a user does not enter a decimal value.
E.g: If a person enters just 200
then it shows error. 'coz it has to satisfy the condition.
I want any no. without decimal to b accepted. And if a no. has a decimal it should chk whether tht it has only one decimal point in it & only 2 places decimal.
Any Help would b appreciated!
Thanx in Advance
Yusuf