...

View Full Version : Validating form inputs are integers



sametch
02-26-2003, 02:59 PM
I am designing a form to enter values into a MySQL database.

One field in the database needs to hold integers. I would like to be able to validate that the value a user enters into the associated form text box is an integer and not a double or text.

The problem I have is all numeric entries end up being type string.

Is there an easy way to validate that a user has typed in an integer?

x_goose_x
02-26-2003, 04:18 PM
http://www.php.net/manual/en/function.is-int.php

sametch
02-26-2003, 05:41 PM
thanks I'll give it a try :thumbsup:

that helped alot, thanks:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum