Re: [PHP] I lied, another question / problem

2007-01-20 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-17 16:59:26 +0100: >> Roman Neuhauser wrote: >>> re_format(7) on FreeBSD: >>> >>> A bracket expression is a list of characters enclosed in `[]'. >>> (...) >>> If two characters in the list are separated by `-', this is >>> s

Re: [PHP] I lied, another question / problem

2007-01-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-21 00:11:13 +0100: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-17 16:59:26 +0100: > >> wouldn't it be fair to assume (safety through paranoia) that > >> ctype_alnum() would suffer the same problem? (given the manual's > >> indication that ctype_alnum() a

Re: [PHP] I lied, another question / problem

2007-01-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-21 10:48:30 +: > # [EMAIL PROTECTED] / 2007-01-21 00:11:13 +0100: > > Roman Neuhauser wrote: > > > # [EMAIL PROTECTED] / 2007-01-17 16:59:26 +0100: > > >> wouldn't it be fair to assume (safety through paranoia) that > > >> ctype_alnum() would suffer the same proble

Re: [PHP] I lied, another question / problem

2007-01-15 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-15 16:31:32 -0500: > I have file which I use for validating which includes the following > function: > > function invalidchar($strvalue) > { > if(!ereg("^[[:alpha:][:space:]\'-.]*$", $strvalue)) { That regexp matches if $strvalue consists of zero or more ocurre

RE: [PHP] I lied, another question / problem

2007-01-15 Thread Beauford
> -Original Message- > From: Roman Neuhauser [mailto:[EMAIL PROTECTED] > Sent: January 15, 2007 7:09 PM > To: Beauford > Cc: PHP > Subject: Re: [PHP] I lied, another question / problem > > # [EMAIL PROTECTED] / 2007-01-15 16:31:32 -0500: > > I have f

Re: [PHP] I lied, another question / problem

2007-01-15 Thread 'Roman Neuhauser'
# [EMAIL PROTECTED] / 2007-01-15 18:33:31 -0500: > > From: Roman Neuhauser [mailto:[EMAIL PROTECTED] > > # [EMAIL PROTECTED] / 2007-01-15 16:31:32 -0500: > > > I have file which I use for validating which includes the following > > > function: > > > > > > function invalidchar($strvalue) > > > { >

RE: [PHP] I lied, another question / problem

2007-01-15 Thread Beauford
> -Original Message- > From: Roman Neuhauser [mailto:[EMAIL PROTECTED] > Sent: January 15, 2007 7:09 PM > To: Beauford > Cc: PHP > Subject: Re: [PHP] I lied, another question / problem > > # [EMAIL PROTECTED] / 2007-01-15 16:31:32 -0500: > > I have f

RE: [PHP] I lied, another question / problem

2007-01-15 Thread Beauford
> -Original Message- > From: 'Roman Neuhauser' [mailto:[EMAIL PROTECTED] > Sent: January 15, 2007 7:53 PM > To: Beauford > Cc: 'PHP' > Subject: Re: [PHP] I lied, another question / problem > > # [EMAIL PROTECTED] / 2007-01-15 18:33:31 -0500

RE: [PHP] I lied, another question / problem

2007-01-15 Thread Beauford
ect: RE: [PHP] I lied, another question / problem > > > > > -Original Message- > > From: 'Roman Neuhauser' [mailto:[EMAIL PROTECTED] > > Sent: January 15, 2007 7:53 PM > > To: Beauford > > Cc: 'PHP' > > Subject: Re: [P

RE: [PHP] I lied, another question / problem

2007-01-15 Thread Beauford
s a value. Basically this has just broken my whole site. If anyone can figure this out let me know, right now I just have to put this site up with no validation. Thanks > -Original Message- > From: Beauford > Sent: January 15, 2007 10:26 PM > To: 'PHP' > Subject:

Re: [PHP] I lied, another question / problem

2007-01-16 Thread Frank Arensmeier
n if I don't return anything it still gets a value. Basically this has just broken my whole site. If anyone can figure this out let me know, right now I just have to put this site up with no validation. Thanks -Original Message- From: Beauford Sent: January 15, 2007 10:26 PM To: 

Re: [PHP] I lied, another question / problem

2007-01-16 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-15 19:22:24 -0500: > > From: 'Roman Neuhauser' [mailto:[EMAIL PROTECTED] > > # [EMAIL PROTECTED] / 2007-01-15 18:33:31 -0500: > > > > From: Roman Neuhauser [mailto:[EMAIL PROTECTED] # > > > > [EMAIL PROTECTED] / 2007-01-15 16:31:32 -0500: > > > > > I have file which

RE: [PHP] I lied, another question / problem

2007-01-16 Thread Beauford
2007 5:49 AM > To: Beauford > Cc: 'PHP' > Subject: Re: [PHP] I lied, another question / problem > > # [EMAIL PROTECTED] / 2007-01-15 19:22:24 -0500: > > > From: 'Roman Neuhauser' [mailto:[EMAIL PROTECTED] # > > > [EMAIL PROTECTED] / 2007-01

Re: [PHP] I lied, another question / problem

2007-01-16 Thread Jim Lucas
breaks the above if. I hope this helps. Thanks -Original Message----- From: Roman Neuhauser [mailto:[EMAIL PROTECTED] Sent: January 16, 2007 5:49 AM To: Beauford Cc: 'PHP' Subject: Re: [PHP] I lied, another question / problem # [EMAIL PROTECTED] / 2007-01-15 19:22:24 -0500: Fr

RE: [PHP] I lied, another question / problem

2007-01-16 Thread Beauford
> This is a bad way to test for a value also, unless you > expecting only TRUE or FALSE and you are sure that it will > always be set. > Otherwise you should do something like this > > if ( isset($formerror) && $formerror != '' ) { > // Display Error > } The problem here is this. formerr

Re: [PHP] I lied, another question / problem

2007-01-16 Thread Jochem Maas
Beauford wrote: > ... >>> function invalidchar($strvalue) >>> { >>> if(!ereg("^[[:alpha:][:space:]\'-.]*$", $strvalue)) { >> That regexp matches if $strvalue consists of zero or more >> ocurrences of a letter, a whitespace character, and any >> character whose numeric value lies between

Re: [PHP] I lied, another question / problem

2007-01-16 Thread Chris
Beauford wrote: This is a bad way to test for a value also, unless you expecting only TRUE or FALSE and you are sure that it will always be set. Otherwise you should do something like this if ( isset($formerror) && $formerror != '' ) { // Display Error } The problem here is this. for

RE: [PHP] I lied, another question / problem

2007-01-16 Thread Beauford
> $formerror = array(); > > ... do your validation here which may/may not add to the array. > > if (!empty($formerror)) { >echo "Something went wrong!"; >print_r($formerror); > } else { >echo "Everything is ok!"; > } As I said the problem is that a value is being returned, how I ch

Re: [PHP] I lied, another question / problem

2007-01-17 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-17 01:42:09 +0100: > Beauford wrote: > > Further to my previous email, there is something weird going on here. I just > > tried using this: > > > > if (!ereg('^[A-Za-z0-9]', $strvalue)) { > > return "error"; > > } > > stop using bleeding ereg*()

Re: [PHP] I lied, another question / problem

2007-01-17 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-17 01:42:09 +0100: >> Beauford wrote: >>> Further to my previous email, there is something weird going on here. I just >>> tried using this: >>> >>> if (!ereg('^[A-Za-z0-9]', $strvalue)) { >>> return "error"; >>> } >> stop

Re: [PHP] I lied, another question / problem

2007-01-17 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-17 11:41:54 +0100: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-17 01:42:09 +0100: > >>if (!preg_match("#^[A-Z0-9]+\$#i", $s)) { > > > >> (ps the above is a crappy regexp for real world use imho, but it serves > >> the purpose of example) > > > > I

Re: [PHP] I lied, another question / problem

2007-01-17 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-17 11:41:54 +0100: >> Roman Neuhauser wrote: >>> # [EMAIL PROTECTED] / 2007-01-17 01:42:09 +0100: if (!preg_match("#^[A-Z0-9]+\$#i", $s)) { (ps the above is a crappy regexp for real world use imho, but it serves the purpose of

Re: [PHP] I lied, another question / problem

2007-01-17 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-17 11:41:54 +0100: >> Roman Neuhauser wrote: >>> # [EMAIL PROTECTED] / 2007-01-17 01:42:09 +0100: if (!preg_match("#^[A-Z0-9]+\$#i", $s)) { (ps the above is a crappy regexp for real world use imho, but it serves the purpose of

Re: [PHP] I lied, another question / problem

2007-01-17 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-17 16:59:26 +0100: > Roman Neuhauser wrote: > > re_format(7) on FreeBSD: > > > > A bracket expression is a list of characters enclosed in `[]'. > > (...) > > If two characters in the list are separated by `-', this is > > shorthand for the full ran