Zend - The PHP Company




Forms

Add Code


PassHiddenVars  

Type: application
Added by: jhilgeman
Entered: 24/04/2001
Last modified: 04/12/2000
Rating: - (fewer than 3 votes)
Views: 7662
Takes variables posted from the previous page's form, and converts them to hidden inputs so they can be passed along multiple page forms.


<?php
function PassHiddenVars ()
{
    
// Bring in Posted Vars
    
global $HTTP_POST_VARS;
    
    foreach(
$HTTP_POST_VARS as $InputName => $InputValue)
    {
        
$HiddenInputs .= "<INPUT NAME='$InputName' TYPE='hidden' VALUE='$InputValue'>n";
    }; 
        
    return 
$HiddenInputs;
}

?>


Usage Example




Rate This Script





Search



This Category All Categories