Re: $HTTP_POST_VARS help!

From: Date: Tue, 06 Jun 2000 00:36:14 +0000
Subject: Re: $HTTP_POST_VARS help!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1102@lists.php.net to get a copy of this message
On Mon, Jun 05, 2000 at 07:47:59PM -0400, Martin Helie wrote: > My goal is to do the following: > > 1. Have user fill out a standard form (that gets posted to a second php > page) > 2. Have the second php page modify some of the information in > $HTTP_POST_VARS > 3. Have this second page redistribute the modified HTTP_POST_VARS to many > html files I'm a bit confused as to what you mean. It's easy to have PHP modify the posted data and then do it with something... but I don't what you mean by redistributing to many html files. > 1. Is it possible to manually write into HTTP_POST_VARS and expect > consistent results? Do you mean $HTTP_POST_VARS["foo"] = bar; That should work, but it won't get passed on to another page, it will simply affect the variables for the rest of the script. > 2. Is it possible to have a php page automatically Submit these (ie, user > doesn't have to press submit button)? No... but it is possible to have php 'echo out' some javascript that will do this. > 3. Is it possible to submit these variables and _not_ actually have the > browser switch to the "receiving" page? You can have a page submit to itself, like this: <? if($submit = "Submit"){ do stuff with submitted vars; } else { ?> <form action='<?echo $PHP_SELF?>' METHOD='POST'> <input type='text' name='foo'> <input type='submit' name='submit' value='Submit'> <? } > The idea is that I need to reformat the Posted variables and redistribute > them to various html pages (each one of which expects different variable > names -- hence the need to modify the keys in HTTP_POST_VARS), but the user > should only enter their information once. I'm still not sure what this means? Are you trying do something along the lines of multiple search engine submissions from one page? Then you could use several fopen()'s or file()'s to read in the different web pages, and pass different url's to each one. If it requires post data, you probably would need to use some javascript to create a hidden form an submit it. Hmm.. I guess I need more details to answer that. -- Chris Moyer -- cmoyer@chekinc.com -- PHP Developer -- Chek.com

« previous php.general (#1102) next »