RE: Validation problem with array.

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

 



Graham, I'm going to make those changes.  Not sure if
that was creating some crazy behaviour. See inline:

--- Graham Cossey <graham@xxxxxxxxxxxxxxx> wrote:

................
> > {
>     if ($skill != '') // Has this skill been
> entered?

I don't know if I care if it's been entered.  My main
concern would be to make sure that if a $skill was
entered, then a matching $skys and $slus
should be:
skills[0]-baker skys[0]-7 slus[0]-2002

but wouldn't want
skill[0]-baker skys[1]-7 slus[2]-2002

In other words I need to figure out how to check that
each "line" is complete.  But~ right now, it is
matching all the values/inputs correctly.  If someone
just chose a slus, seems the database won't take it.

>     {
>       // You may also want to check for sky & slu
> entries

Not sure why I would want too:

> > //$result = mysql_query($query);
> > $res6 = run_query($query);
> > echo $query;
>   ^^^^^^^^^^^
>   What does this output?

It outputs the insert and values string.  
And it seems to print the iteration:

INSERT INTO LurkProfiles_Skicerts (SkicertID,
ProfileID, SkilCerts, NumYear, Lused) VALUES (null,
39, 'aaaaa', 2,1)INSERT INTO LurkProfiles_Skicerts
(SkicertID, ProfileID, SkilCerts, NumYear, Lused)
VALUES (null, 39, 'bbbbb', 3,2)INSERT INTO
LurkProfiles_Skicerts (SkicertID, ProfileID,
SkilCerts, NumYear, Lused) VALUES (null, 39, 'ccccc',
4,3)INSERT INTO LurkProfiles_Skicerts (SkicertID,
ProfileID, SkilCerts, NumYear, Lused) VALUES (null,
39, 'ddddd', 5,4)INSERT INTO LurkProfiles_Skicerts
(SkicertID, ProfileID, SkilCerts, NumYear, Lused)
VALUES (null, 39, 'eeeee', 6,5)your insertions were
successful

>     }// end if ($skill != '')

This probably makes sense to add , perhaps that is why
if I don't use all the elements for input I get a
syntax error.

Stuart

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