David Mehler wrote:
> Hello,
> I've got a form with three fields that are not required for proper
> completion of it, ending month, day, year fields. If a user enters
> nothing no problem, but if those form fields are entered I need them
> validated. They have to be in the correct format -MM-DD
On Mon, 2010-06-07 at 16:51 -0400, David Mehler wrote:
> Hello,
> I've got a form with three fields that are not required for proper
> completion of it, ending month, day, year fields. If a user enters
> nothing no problem, but if those form fields are entered I need them
> validated. They have to
Hello,
I've got a form with three fields that are not required for proper
completion of it, ending month, day, year fields. If a user enters
nothing no problem, but if those form fields are entered I need them
validated. They have to be in the correct format -MM-DD date
format and that value al
You mean
if( $var == "duck" || $var == "goose" ..etc
A single equal sign is assignment, double is test for equality.
Check the string functions, you could try something like:
if ( strpos( "duckgoosehenchickenpeacock", $var ) != 0 ) {do something}
else {critter in $var not part of our set}
I
try
if($var = "duck" || $var = "goose"){}else{}
now you should look into the switch-case function also
--
On Wed, 13 Dec 2000 00:19:08
JCampbell wrote:
>Thank you all for your help earlier!
>
>Now I need to know if it is possible to create a complex if statement?
>
>if ($variable=="duck") ||
if (($variable=="duck") || ($variable=="goose")) { } else { }
-Original Message-
From: JCampbell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 12, 2000 11:19 PM
To: Main PHP List
Subject: [PHP] Complex IF statement
Thank you all for your help earlier!
Now I n
On Wed, 13 Dec 2000 15:49, JCampbell wrote:
> Thank you all for your help earlier!
>
> Now I need to know if it is possible to create a complex if statement?
>
> if ($variable=="duck") || ($variable=="goose"){ }else{ }
>
> Is how I thought it would work. I just need to know if there is an easy
> w
Thank you all for your help earlier!
Now I need to know if it is possible to create a complex if statement?
if ($variable=="duck") || ($variable=="goose"){ }else{ }
Is how I thought it would work. I just need to know if there is an easy way
to do an OR in if statements IF variable equals duck o
8 matches
Mail list logo