[thelist] PHP help please- parsing text to variables

Paul Bennett paul at teltest.com
Wed Mar 19 18:34:23 CST 2003


Todd wrote:

>Help!!!! I'm trying to save a form. So I write the $http_post_vars to a
>text document now how do I get them out?
> 
>
Whoa there big fella. First of all: the $HTTP_POST_VARS array is just 
that - an array, to access the VALUES you will need to reference them 
(usually by name) and put them in a string.
For example to put them into a normal text string you could use:
foreach($HTTP_POST_VARS as $key=>$value)
    {
    $string.=$key."=".$value."/n";
    }
This will loop through the keys and values that are posted to a script, 
then you can put the *string* into a file
Does this help?

-- 
 ------------------------------
	Paul Bennett						
	Internet Developer				
	Teltest Electronic Design		
 ------------------------------			
Email: paul at teltest.com				
Phone: 64 4 237 4557					
Web: http://www.teltest.com		
Wap: http://wap.teltest.com			




More information about the thelist mailing list