Re: resubmitting $POST data to another script
| From: | Chris Shiflett | Date: | Tue, 02 Mar 2004 23:55:46 +0000 |
| Subject: | Re: resubmitting $POST data to another script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179322@lists.php.net to get a copy of this message | ||
--- Marek Kilimajer <kilimajer@webglobe.sk> wrote:
> This method does not lose any post data as the whole $_POST array is
> serialized. Then it is unserialized back to $_POST array at the second
> page.
It loses all new data:
<input type="hidden" name="post"
value="<?php echo htmlspecialchars(serialize($_POST)); ?>" />
<input type="text" name="this_will_be_lost" />
Because of this:
$_POST = unserialize(stripslashes($_POST['post']));
The method is fine, but it's no simpler than the other person's suggestion
when this specific scenario is considered. More logic is necessary to
prevent the loss of data.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming mid-2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
PHP Community Site
http://phpcommunity.org/