Re: Array in a $_session

From: Date: Tue, 17 Jun 2003 02:06:19 +0000
Subject: Re: Array in a $_session
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-151769@lists.php.net to get a copy of this message
Frank Keessen wrote:
Hi jason & the rest, Dit the session_write_close()! Nothing still displayed in step3, more thoughts?? $_REQUEST["submit"]=isset($_REQUEST["submit"])?$_REQUEST["submit"]:""; if($_REQUEST['submit']!="") { foreach($_POST['test1'] as $i => $Value) { $_SESSION['test1'][$i] = $_POST['test1'][$i]; } session_write_close(); header("Location: step3.php");
Do you have a session_start() on page 2?
(step 3) session_start(); $aantalpers=$_SESSION["aantalpers"]; $test1 = $_SESSION['test1'][$i]; echo $test1; for ($i=1; $i<=$_SESSION['test1'][$i]; $i++)
    {
echo $test1; }
Do a print_r($_SESSION); on page 3 to see what's in your session. What is $i on page 3? I don't see where you set it. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com

« previous php.general (#151769) next »