string->integer

From: Date: Fri, 23 Mar 2001 11:40:33 +0000
Subject: string->integer
Groups: php.general 
Request: Send a blank email to php-general+get-45266@lists.php.net to get a copy of this message
Hi I am trying to validate a form to check the user has entered there date of birth correctly There are three fields day, month & year. how can I check whether a string is a number? I have tried using is_long(), is_int(), is_integer() to check the values ,but it doesn't seem to be working. the code I have tried is if(!is_int($dobd)) { print "error"; } else { //carry on } could someone help me as to where I'm going wrong TIA M@

« previous php.general (#45266) next »