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() and the

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 problem? (given the

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 shorthand for the

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*() function - move

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 using bleeding ereg*()

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) It's dangerous.

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 example) It's

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 example) It's

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 range of

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

2007-01-16 Thread Frank Arensmeier
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 Does

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 I use for

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

2007-01-16 Thread Beauford
lied, another question / problem # [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

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

2007-01-16 Thread Jim Lucas
then $formerror has a value which 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

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. formerror is an

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 the numeric

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.

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 check it is

[PHP] I lied, another question / problem

2007-01-15 Thread Beauford
I have file which I use for validating which includes the following function: function invalidchar($strvalue) { if(!ereg(^[[:alpha:][:space:]\'-.]*$, $strvalue)) { return *; } } Here is the problem. If I don't use the function, like below, there is no

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 ocurrences of

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 file which I use for validating which includes

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 file which I use for validating which includes

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: From: Roman Neuhauser [mailto:[EMAIL PROTECTED

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

2007-01-15 Thread Beauford
question / problem -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: From: Roman Neuhauser

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

2007-01-15 Thread Beauford
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