Friday 16 June 2017

How can i validate integer form in php?



I want to validate integer form using PHP. Do anyone of you know how to validate it?
my code like this
`
Thông tin thành viên
">



        First name : 

Last name :
User Name:
Password:
Email:
Phone:
Cấp độ :






`


When people input the phone i want to check whether it is integer or not? can you help?



Answer



Try using this is you want to check it on runtime.



Phone: 


Or use is_int or is_numeric if you want to check the phone number after POST.


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...