Forget about cookies and sessions (because cookies are evil). The way I
do something like this is:
<?php
foreach ($_POST as $key => $value)
{
if (!(($key == 'dont_save') OR ($key == 'dont_save_2')))
{ hidden($key, $value); }
}
function hidden($key, $value)
// saves lots of time
{ print "<INPUT TYPE=HIDDEN NAME='{$key}' VALUE='{$value}'>\n"; }
?>
Then you can keep information from one form to the next. If you really
want to get tricky add something like:
<?php
foreach ($key_not_to_save as $key)
{ hidden("dontsave[1]",$key); }
// then you can call the foreach above as:
foreach ($_POST as $key => $value)
{
if (!($_POST['dont_save[{$key}]'] )_
{ hidden($key, $value); }
}
?>
-Dan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php