I don't understand the gettype() function or any of the other check variable functions. Forms by default make everything a string so how can you check if an entry a user put in the field is an integer?
gettype() always returns a string and the search on this board doesn't seem to be working.
Is there a simple example of working code where someone uses a gettype() for a form field that will tell you if it is an integer or not? Someone said before I would need to use a regular expression to get the job done. What is that. Everything I tried doesn't work.
Here is a field. A user enters something and hits submit. How do you check if the variable is an integer or not.
<input type="text" name="books" size="20">
Thanks.