Re: [PHP] checking to see if value is a integer from a form text field

2001-02-15 Thread Richard Lynch
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

RE: [PHP] checking to see if value is a integer from a form text field

2001-02-15 Thread Jason Murray
> 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),

[PHP] checking to see if value is a integer from a form text field

2001-02-15 Thread Joseph H Blythe
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,