PC Nerd Posted June 27, 2007 Share Posted June 27, 2007 hi guys. I have a really simple lotto simulation in making for my class. I just want to add validation to it, becauase i know some of them will try and place text into the fields. i have a text field, in which they place the number. Whay i want to do is to check if its text etc, and to check if its between 0, 50, and redirect if either of those return true is there a function such as: if(is_int($val)) or similar? thanks Link to comment https://forums.phpfreaks.com/topic/57383-solved-ensuring-inout-is-integer/ Share on other sites More sharing options...
gerkintrigg Posted June 27, 2007 Share Posted June 27, 2007 have you tried using a str replace function or preg match? Link to comment https://forums.phpfreaks.com/topic/57383-solved-ensuring-inout-is-integer/#findComment-283882 Share on other sites More sharing options...
PC Nerd Posted June 27, 2007 Author Share Posted June 27, 2007 im not familiar with these functions. i dont want to replace it at all, i just want o know what is it, eg string, int etc. Link to comment https://forums.phpfreaks.com/topic/57383-solved-ensuring-inout-is-integer/#findComment-283886 Share on other sites More sharing options...
trq Posted June 27, 2007 Share Posted June 27, 2007 Do you know how to use the manual? Link to comment https://forums.phpfreaks.com/topic/57383-solved-ensuring-inout-is-integer/#findComment-283890 Share on other sites More sharing options...
sushant_d84 Posted June 27, 2007 Share Posted June 27, 2007 is_numeric ctype_digit Link to comment https://forums.phpfreaks.com/topic/57383-solved-ensuring-inout-is-integer/#findComment-283892 Share on other sites More sharing options...
PC Nerd Posted June 27, 2007 Author Share Posted June 27, 2007 tnkx Link to comment https://forums.phpfreaks.com/topic/57383-solved-ensuring-inout-is-integer/#findComment-283907 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.