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 Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
sushant_d84 Posted June 27, 2007 Share Posted June 27, 2007 is_numeric ctype_digit Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted June 27, 2007 Author Share Posted June 27, 2007 tnkx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.