Hi I'm having problems passing a $POST array to $SESSION and holding it over multiple pages. Please see code below.
<?php session_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<form name="test" action="post_test2.php" method="post">
<input type="text" name="test">
<input type="text" name="tes1"
<input type="submit" name="su2bmit">
</form>
</body>
</html>
Page 2
<?php
session_start();
$_SESSION[postarray] = $_POST;
echo '
<form name="form2" method="post" action="post_test3.php">
<input type="submit">
</form>
';
echo "POST:<pre>";
print_r ( $_POST );
print_r ( $_POST _;
?>
Here are the results from this:
Array
(
[test] =>
[tes1] =>
[su2bmit] =>
)
Array
(
[postarray] => Array
(
[test] =>
[tes1] =>
[su2bmit] =>
)
)
Page 3
<?php
session_start();
print_r ( $_SESSION );
?>
Here are the results:
Array ( [postarray] => Array ( ) )