Re: [PHP] Validating form field text input to be a specific variable type

2004-04-07 Thread William Lovaton
Instead of doing a lot of casting, you can use is_numeric() to see if a variable is a number or a numeric string. -William El mar, 06-04-2004 a las 14:19, John W. Holmes escribió: > Well, if "(int)$string == $string", then the value is an integer. Same for > "(float)$string == $string" for a real

Re: RE: [PHP] Validating form field text input to be a specific variable type

2004-04-06 Thread holmes072000
> From: "Merritt, Dave" <[EMAIL PROTECTED]> > > Okay seems to makes sense, but when I do the following it doesn't appear to > be working correctly, or I'm viewing my logic incorrectly one: > > if ( (int)$PageOptions['Default'] == $PageOptions['Default'] ) { This works: if(strcmp((int)$PageOpt

RE: [PHP] Validating form field text input to be a specific variable type

2004-04-06 Thread Merritt, Dave
hat am I missing here? Thanks, Dave Merritt [EMAIL PROTECTED] -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 3:19 PM To: Merritt, Dave; [EMAIL PROTECTED] Subject: Re: [PHP] Validating form field text input to be a specific variab

RE: [PHP] Validating form field text input to be a specific variable type

2004-04-06 Thread Merritt, Dave
hat am I missing here? Thanks, Dave Merritt [EMAIL PROTECTED] -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 3:19 PM To: Merritt, Dave; [EMAIL PROTECTED] Subject: Re: [PHP] Validating form field text input to be a specific variab

Re: [PHP] Validating form field text input to be a specific variable type

2004-04-06 Thread John W. Holmes
From: "Merritt, Dave" <[EMAIL PROTECTED]> > I have a form on which the user is supposed to select a variable type > (boolean, integer, real, date/time, text) from a select box and enter the > default value for this selected variable type in a text box. I'm trying to > validate that the default va