> -Original Message-
> From: Jim Lucas [mailto:[EMAIL PROTECTED]
> Sent: January 17, 2007 8:10 PM
> To: Jim Lucas
> Cc: Beauford; 'PHP'
> Subject: Re: [PHP] One last try at this!
>
> Jim Lucas wrote:
> > Beauford wrote:
> >> This is
# [EMAIL PROTECTED] / 2007-01-18 01:48:25 -0800:
> Roman Neuhauser wrote:
> ># [EMAIL PROTECTED] / 2007-01-17 17:02:12 -0800:
> >>Beauford wrote:
> >>> if(!preg_match("/^[-A-Za-z0-9_.' ]+$/", $string)) {
> >>> return "Invalid Characters";
> >>>}
> >
> >>In your regex you have a "." this will
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-17 17:02:12 -0800:
Beauford wrote:
if(!preg_match("/^[-A-Za-z0-9_.' ]+$/", $string)) {
return "Invalid Characters";
}
In your regex you have a "." this will match anything
try this:
That "." is inside a characte
# [EMAIL PROTECTED] / 2007-01-17 17:02:12 -0800:
> Beauford wrote:
> > if(!preg_match("/^[-A-Za-z0-9_.' ]+$/", $string)) {
> > return "Invalid Characters";
> >}
> In your regex you have a "." this will match anything
>
> try this:
>
>
> function ValidateString($string) {
> i
nt) ) !== false ) {
$formerror['secondAttempt'] = $result;
}
var_dump($formerror);
?>
Jim Lucas
-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED] Sent: January 17, 2007 4:36 PM
To: Jay Blanchard
Cc: Beauford; PHP
Subject: Re: [PHP] One last try at this!
Jay Blancha
match anything
try this:
Jim Lucas
-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED]
Sent: January 17, 2007 4:36 PM
To: Jay Blanchard
Cc: Beauford; PHP
Subject: Re: [PHP] One last try at this!
Jay Blanchard wrote:
[snip]
The second condition of each if s
D]
> Sent: January 17, 2007 4:36 PM
> To: Jay Blanchard
> Cc: Beauford; PHP
> Subject: Re: [PHP] One last try at this!
>
> Jay Blanchard wrote:
> > [snip]
> >
> >> The second condition of each if statement does not contain
> equality
> >> c
Jay Blanchard wrote:
[snip]
The second condition of each if statement does not contain equality
checking, it sets the $result to ValidateString($event, "2"). That
should be
if($result == ValidateString($event, "2")) or
if($result === ValidateString($event, "2"))
What if the intension
[snip]
> The second condition of each if statement does not contain equality
> checking, it sets the $result to ValidateString($event, "2"). That
> should be
> if($result == ValidateString($event, "2")) or
> if($result === ValidateString($event, "2"))
>
>
What if the intension was to fail if the
Jay Blanchard wrote:
[snip]
if(empty($orgname)) { $formerror['orgname'] = "Optional"; }
elseif($result = ValidateString($orgname, "2")) { $formerror['orgname']
=
$result; }
if(empty($website)) { $formerror['website'] = "Optional"; }
if($result = ValidateString($website, "2")) { $formerro
[snip]
if(empty($orgname)) { $formerror['orgname'] = "Optional"; }
elseif($result = ValidateString($orgname, "2")) { $formerror['orgname']
=
$result; }
if(empty($website)) { $formerror['website'] = "Optional"; }
if($result = ValidateString($website, "2")) { $formerror['website'] =
$result;
Your right. I have been sitting here at this computer for 3 days straight
with all the various problems, and I missed this. I need a break, I need a
KitKat.
Thanks to the list for all the help over the last couple of days. I'm going
to watch CSI and get away from this.
> Take a little closer
On 17 Jan 2007, at 17:38, Beauford wrote:
if(empty($orgname)) { $formerror['orgname'] = "Optional"; }
elseif($result = ValidateString($orgname, "2")) { $formerror
['orgname'] =
$result; }
if(empty($website)) { $formerror['website'] = "Optional"; }
if($result = ValidateString($website
Beauford wrote:
I hope I can explain this so I can get this figured out, 'cause if not I may
just have to find an alternative to PHP. I can't be wasting 3 and 4 days on
something as simple as this.
Below are 3 validation routines. When I first enter the page 'Optional' is
displayed for all of th
On 1/17/07, Beauford <[EMAIL PROTECTED]> wrote:
I hope I can explain this so I can get this figured out, 'cause if not I may
just have to find an alternative to PHP. I can't be wasting 3 and 4 days on
something as simple as this.
This isn't a very nice intro into asking a question on a mailing l
I hope I can explain this so I can get this figured out, 'cause if not I may
just have to find an alternative to PHP. I can't be wasting 3 and 4 days on
something as simple as this.
Below are 3 validation routines. When I first enter the page 'Optional' is
displayed for all of them as it should be
16 matches
Mail list logo