Re: Validation problem with array.

From: Date: Thu, 21 Oct 2004 09:46:31 +0000
Subject: Re: Validation problem with array.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199964@lists.php.net to get a copy of this message
You mean why do i have $_SESSION['skills'] in the foreach ? Stuart --- Andre Dubuc <aajdubuc@webhart.net> wrote: > Hi Stuart, > > I haven't followed your thread too closely, but I > did see something that might > be the cause of your problems: > > [snip] > > > Let me show you how I set it all up. Remember it's > a > > multi page form: > > So the form elements are: skills[], skys[], slus[] > > Then on the next page I have to still pass the > session > > variables, and so: > > > > $_SESSION['skills'] = $_POST['skill']; > > $_SESSION['skys'] = $_POST['sky']; > > $_SESSION['slus'] = $_POST['slu']; > > > > Now the transcation script: > > > > $skills = $_SESSION['skills']; > > $skys = $_SESSION['skys']; > > $slus = $_SESSION['slus']; > > > > foreach($_SESSION['skills'] as $key => $skill) > ^^ ^^ > > I'm puzzled why you reverted to $_SESSION['skills'] > when the line above you've > set $skills = $_SESSION['skills']?? > > HTH, > Andre >

« previous php.general (#199964) next »