# [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
# [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
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
# [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
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*()
# [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.
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
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
# [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
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
# [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
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
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
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
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
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.
$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
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
# [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
-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
# [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)
{
-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
-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
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
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
25 matches
Mail list logo