Reputation: 26556
Is there any way to do some kind of while()
for each post variable and session it up... like in mysql
while($row=mysql_fetch_array($result)){
echo($row['name'];
}
But to get this result with the $_POST
while($_POST){
$_SESSION['BLA'] = $_POST['BLA'];
}
Upvotes: 1
Views: 649
Reputation: 10806
foreach($_POST as $key => $value){
echo $key . ' = ' .$value. ' <br />';
// do whatever you want to do with these variables
}
Or
just for example, if you just want to put all of those in $_POST into $_SESSION
$_SESSION['MyPost'] = $_POST;
Upvotes: 3