These lines store the FORM's posted values (arrays)
into your SESSION:
$_SESSION['skills'] = $_POST['skill']; 
$_SESSION['skys'] = $_POST['sky']; 
$_SESSION['slus'] = $_POST['slu'];

These lines get your SESSION variables (arrays) and
put them into 'local' script array variables.
If you are doing these then you MUST have done the above
in the previous script.
$skills = $_SESSION['skills'];
$skys = $_SESSION['skys'];
$slus = $_SESSION['slus'];

If you are doing it all in one script just use:
$skills = $_POST['skills'];
$skys = $_POST['skys'];
$slus = $_POST['slus'];

Make sense?
If not, may I suggest you do a bit of reading on
PHP and form processing before proceeding. 
I have found the PHP manual extremely useful. 
With it (and some googling) I have gone from zero 
PHP knowledge 10 months ago to being able to 
develop and maintain an entire PHP/MySQL based
web application subscribed to by several clients. 


HTH
Graham

> -----Original Message-----
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 18 October 2004 09:37
> To: Graham Cossey; [EMAIL PROTECTED]
> Subject: RE: [PHP] Nested foreach ?
> 
> 
> Wish I had better news.
> 
> Warning: Invalid argument supplied for foreach() in
> /home/lurkkcom/public_html/TestMultiTrans2.php on line
> 90
> INSERT INTO LurkProfiles_Skicerts (ProfileID,
> SkilCerts, NumYear, Lused) VALUES ()
> 
> 
> line 90: foreach($skills as $key => $skill)
> 
> To confirm : 
> 
> I changed to this:
> > // Doing this makes the code below easier to read
> > $skills = $_SESSION['skills'];
> > $skys = $_SESSION['skys'];
> > $slus = $_SESSION['slus'];
> 
> From this : 
> I changed the $_SESSION['skills'] = $_POST['skill']; 
> $_SESSION['skys'] = $_POST['sky']; 
> $_SESSION['slus'] = $_POST['slu'];
> 

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

Reply via email to