RE: Validation problem with array.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
> Right now I have this [right below]: If I want to
> check for skys and slus, I add another set of braces
> with if($sky != '' ...
> and below "end if ($sky != '')........
> 
> 
> > foreach($skills as $key => $skill)
>     {
>     if ($skill != '' && $skys[$key] != '' &&
> $slus[$key] != '')
>     {
>       
> $query = "INSERT INTO LurkProfiles_Skicerts
> (SkicertID, ProfileID, SkilCerts, NumYear, Lused) 
> VALUES (null, $LID, '$skill',
> $skys[$key],$slus[$key])";
> $res6 = run_query($query);
> echo "Query $key = $query <br>";
> 	} end if ($skill != '')
> 
> }

That looks pretty much like what you want except for:

 	} //end if ($skill != '')
        ^^
        Comment, this is just to help identify what the brace is closing.

Graham

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux