Re: Is it possible to send POST vars through a header redirect?

From: Date: Wed, 04 Feb 2009 18:23:24 +0000
Subject: Re: Is it possible to send POST vars through a header redirect?
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-287624@lists.php.net to get a copy of this message
Stuart wrote: > 2009/2/4 Jônatas Zechim <zechim.php@gmail.com>: >> Try curl > > 1) I really wish people would look at other replies to a post before > sending their own. Duplicates are rarely useful. > > 2) CURL cannot perform a "header redirect" as the OP is asking for, so > the more useful response is to ask what they're actually trying to > achieve because they're wanting to know how to do something that's not > possible so the question is flawed. > > Rant over. > > -Stuart > >> -----Mensagem original----- >> De: Stuart [mailto:stuttle@gmail.com] >> Enviada em: quarta-feira, 4 de fevereiro de 2009 07:52 >> Para: TS >> Cc: php-general@lists.php.net >> Assunto: Re: [PHP] Is it possible to send POST vars through a header redirect? >> >> 2009/2/3 TS <sunnrunner@gmail.com>: >>> I'm trying to send vars via POST somehow. Is this possible? >>> >>> Currently I'm doing >>> >>> header("Location: >>> http://domain/index.php?var=3"); >>> >>> but, want to send POST or some other method that doesn't stick with the session. >> I'm not sure what you mean by "stick with the session". What exactly >> are you trying to achieve? >> >> -Stuart >> >> -- >> http://stut.net/ Well, since the OP can't POST using header, then maybe alternatives to help them out? If you want to use sessions or are already using them (i.e. session_start() on each of the pages), you can just use session vars: session_start(); $_SESSION['var'] = 3; header("Location: http://domain/index.php"); exit; Then in the next page you have the var: session_start(); $var = $_SESSION['var']; -- Thanks! -Shawn http://www.spidean.com

« previous php.general (#287624) next »