Re: [PHP-DB] Forms : Validating user input is integer

2001-04-07 Thread Boclair
Manuel, Manuel Lemos <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | Hello boclair, | | On 05-Apr-01 01:58:24, you wrote: | | >I have a problem with a user input in a form required to be an | >integer, creating a variable for a mysql query. | | >I have instance

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-07 Thread Manuel Lemos
Hello boclair, On 05-Apr-01 01:58:24, you wrote: >I have a problem with a user input in a form required to be an >integer, creating a variable for a mysql query. >I have instances where integer, 0, is being typed as letter,o. >The last discussion of validating the input was >http://marc.theaim

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread Boclair
Ben Udall <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | boclair wrote: | > I have a problem with a user input in a form required to be an | > integer, creating a variable for a mysql query. | > | > I have instances where integer, 0, is being typed as letter,o

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread Boclair
^^ Brad, - Original Message - From: Brad S. Jackson <[EMAIL PROTECTED]> To: boclair <[EMAIL PROTECTED]> Sent: Thursday, April 05, 2001 11:54 PM Subject: Re: [PHP-DB] Forms : Validating user input is integer > > > This is probably the most efficient way to check.

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread boclair
- Original Message - From: Matt Williams <[EMAIL PROTECTED]> To: Boclair <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, April 05, 2001 11:28 PM Subject: RE: [PHP-DB] Forms : Validating user input is integer The line should read, and as I tested it, > &g

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread Ben Udall
boclair wrote: > I have a problem with a user input in a form required to be an > integer, creating a variable for a mysql query. > > I have instances where integer, 0, is being typed as letter,o. > > The last discussion of validating the input was > http://marc.theaimsgroup.com/?l=php-db&m=9720

RE: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread Matt Williams
> Whoops! Careless of me. The line should read, and as I tested it, > > elseif (eregi("[a-zA-Z]",$num)) { } > > Do you see any problem with this? Yes, same thing it will accept other character like !*- etc... try if(!eregi("^[0-9]+[0-9]*$",$num) { //error } M@ -- PHP Database M

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread Boclair
"Matt Williams" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | | > or even just | > elseif (!eregi("[^a-zA-Z]"),$num)) { } | | But that would not stop other characters. | | M@ Whoops! Careless of me. The line should read, and as I tested it, elseif (ereg

RE: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread Matt Williams
> or even just > elseif (!eregi("[^a-zA-Z]"),$num)) { } But that would not stop other characters. M@ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EM

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread Boclair
ay, April 05, 2001 9:03 PM | Subject: RE: [PHP-DB] Forms : Validating user input is integer | | | > | > > To gain the full benefit of your suggestion I find that I can | validate | > > for a wrong entry containing a mix alphabetical and numerical | > > characters by altering

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread boclair
- Original Message - From: Matt Williams <[EMAIL PROTECTED]> To: boclair <[EMAIL PROTECTED]> Sent: Thursday, April 05, 2001 9:03 PM Subject: RE: [PHP-DB] Forms : Validating user input is integer > > > To gain the full benefit of your suggestion I find that I c

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-05 Thread Boclair
05, 2001 8:05 PM Subject: RE: [PHP-DB] Forms : Validating user input is integer > try elseif(!eregi("[0-9]",$num)) To gain the full benefit of your suggestion I find that I can validate for a wrong entry containing a mix alphabetical and numerical characters by altering the elseif line to

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-04 Thread boclair
lidation was being with a javascript and the creation of the variable was OK. Further advise appreciated. Tim - Original Message - From: Steve Farmer <[EMAIL PROTECTED]> To: boclair <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, April 05, 2001 3:23 PM Subj

Re: [PHP-DB] Forms : Validating user input is integer

2001-04-04 Thread Steve Farmer
Hi tim, most certainly it can be done on the server side, it juts requires a round trip to the server is all i think it is .. if(!isinteger($input_var)): (check the exact function in the php manual) echo "this is an error (or whatever), press here to go back and correct your inpout"; ex

[PHP-DB] Forms : Validating user input is integer

2001-04-04 Thread boclair
I have a problem with a user input in a form required to be an integer, creating a variable for a mysql query. I have instances where integer, 0, is being typed as letter,o. The last discussion of validating the input was http://marc.theaimsgroup.com/?l=php-db&m=97207172003983&w=2 There it was