RE: [PHP] Capturing $_POST variables

From: Date: Fri, 28 Nov 2003 13:42:44 +0000
Subject: RE: [PHP] Capturing $_POST variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171268@lists.php.net to get a copy of this message
Shaun wrote: > Hi, > > is it possible to capture $_POST variables sent from a > previous page so i can send them on to the next page? > > Thanks for your help. might wanna try (before any output, including spaces): <?php session_start(); foreach($_POST as $Key => $Value) $_SESSION[$Key] = $Value; But consider some checks to test if no values from $_SESSOIN are accidently overwritten (a user can post ANY value to ANY page he/she wants, this is NOT restricted to the form fields you have defined). ?>

« previous php.general (#171268) next »