You are here: Re: Form Validation « PHP Programming Language « IT news, forums, messages
Re: Form Validation

Posted by Scott Johnson on 11/15/05 00:42

Chung Leong wrote:
> 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.
>
is_numeric will recognize decimals such as .05 as numeric. It may be
that your code is type casting that value to a char.

If you can maybe send some code, unless someone in here has an opinion
on this.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация