Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

PHP: Pass On Values For A Multi-Page Form (See related posts)

While the best way to do this involves saving the data into a database and passing an encrypted reference to the next page, this method will suffice for non-critical uses.

foreach ($_POST as $field=>$value) {
	echo "<input type=\"hidden\" name=\"" . $field . "\" value=\"" . $value . "\" />";
}

Comments on this post

ellisgl posts on Aug 10, 2007 at 13:03
I've had to use that code before. It's quite nice. You can also load all the post's to the $_SESSION.

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts