I am trying to use ereg to validate a price. I am asking users to enter a price for a product in a text box - I do not want to allow anything but 0-9 and a period/full stop.
Can anyone help me with the ereg syntax? I would of thought it would be something like:-
(!ereg ("^[0-9].[0-9]$"), $price))
But this wont work, because there can be more than one digit before and/or after the period/full-stop.
Please help, thanks