om/volunteer.htm
- Original Message -
From: Joseph H Blythe <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Thursday, February 15, 2001 7:32 PM
Subject: [PHP] checking to see if value is a integer from a form text field
> hey,
>
> I have a strange problem, when a user inputs
> I have a strange problem, when a user inputs the quantity
> into a text input field in a cart, I want to be able to test
> to see if the value is a integer if it isn't then default it to 1
>
> if ( !is_int($Qty) ) {
> $Qty = 1;
> }
Off the top of my head (and thus probably hideously wrong),
hey,
I have a strange problem, when a user inputs the quantity into a text input field in a
cart, I want to be able to test to see if the value is a integer if it isn't then
default it to 1
if ( !is_int($Qty) ) {
$Qty = 1;
}
Looks ok, should work in theory, but it doesn't if I use this test,
3 matches
Mail list logo