Array in a $_session

From: Date: Mon, 16 Jun 2003 21:12:12 +0000
Subject: Array in a $_session
Groups: php.general 
Request: Send a blank email to php-general+get-151727@lists.php.net to get a copy of this message
Hi, Still strugling with array's ;> : Can you help me with this?? <input type=\"text\" name=\"test1[$i]\" size=\"6\"> How can i put that value into an $_SESSION?? Something like $_SESSION["test1"][$i]?? This is the way i put into a database foreach($_POST['test1'] as $i => $Value) { $query = "INSERT INTO test (test1, test2, test3, test4 , test5) VALUES ('".$_POST['test1'][$i]."', '".$_POST['test2'][$i]."', '".$_POST['test3'][$i]."', '".$_POST['test4'][$i]."', '".$_POST['test5'][$i]."')"; $result = mysql_query($query); But i've got no clue how to put into a session and retrieve it.. Can you help? Regards, Frank

« previous php.general (#151727) next »