Thorsten Körner wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Shaun > Am Freitag, 28. November 2003 14:41 schrieb Shaun: >> Thanks for your reply, >> >> I don't really need to do anything with them, just make sure they all >> retain their original values... > > If you are using a form to sent the data again to third page > you can do this foreach ($_POST as $key => $value) { > echo "<input type=\"hidden\" name=\"".$key."\" value="". > $value."\">"; } > > Another way is the following: > > $postData = $_POST; > > echo "<input type=\"hidden\" name=\"postData\" value="". > $postData."\">"; > > CU > > Thorsten
This won't work. $_POST is always an array. If you want to go all the way of re-posting the postdata, this is an appraoch that would WORK. I'm not saying it's a GOOD appraoch (as others have said, it isn't :D): echo "<input type='hidden' name='PreviousPostData' value='".htmlentities(addslashes(serialize($_POST)))."'>"; and on the other one $PreviousPostData = unserialize(stripslashes($_POST['PreviousPostData'])); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php