note 12750 deleted from function.print-r by philip

From: Date: Tue, 04 Dec 2001 02:24:52 +0000
Subject: note 12750 deleted from function.print-r by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21588@lists.php.net to get a copy of this message
If you want a script to catch some given values (i.e. $HTTP_POST_VARS). This is very usefull if you have a ton of forms that need to get sent to a mail recipient for instance and want on generic form to catch them all. try this function on the receiving end of a POST'ed HTML form. It will catch and format all variable names and corosponding values and rout them into a variable "$temp" <? ob_start(); var_dump($HTTP_POST_VARS); $output = ob_get_contents(); ob_end_clean(); $ct=11; $br_toggle = 0; while ($output[$ct] != '}'){ if ($output[$ct] =='"'){ $ct++; while($output[$ct] != '"'){ $temp .= $output[$ct]; $ct++; } // --------END WHILE if($br_toggle == 1){ $temp .= '<br>'; $br_toggle = 0; } else { $temp .= ': '; $br_toggle = 1; } // -------END BR TOGGLE SEQUENCE } $ct++; } //END WHILE echo "<font face=verdana size=2>"; echo $temp; ?> cheers

« previous php.notes (#21588) next »