int and strings
| From: | bryan brown | Date: | Thu, 12 Oct 2000 14:44:07 +0000 |
| Subject: | int and strings | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19811@lists.php.net to get a copy of this message | ||
Hi. I know that when forms get submitted, all the
fields are strings. Suppose I have an age field and I
want to check to see if somebody is over 13, I have
this:
if(is_int($age)){
if($age <= 13){
include('age_error.html');
}
}
else{
$ageflag = 1;
include('userform2.php3');
}
Now, do I need to covert $age to int first or does PHP
automatically do this. Thanks.
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/