Posted by Chung Leong on 11/14/05 18:42
Darren wrote:
> Hello,
>
> I am sure this subject has been done to death, but I would like to make
> sure that a form post is an interger or a float.
>
> I have used
>
> if (!ctype_digit($current_value)
>
> but this is true if the number contains a decimal point.
>
> I probably need a good tutorial/guide on form validation.
>
>
> Darren
There is is_numeric(), although the function is buggy in that it
doesn't recognize ".05" as a number.
Navigation:
[Reply to this message]
|