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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stuart wrote:
> 2009/2/4 Jônatas Zechim <zechim.php@xxxxxxxxx>:
>> 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@xxxxxxxxx]
>> Enviada em: quarta-feira, 4 de fevereiro de 2009 07:52
>> Para: TS
>> Cc: php-general@xxxxxxxxxxxxx
>> Assunto: Re:  Is it possible to send POST vars through a header redirect?
>>
>> 2009/2/3 TS <sunnrunner@xxxxxxxxx>:
>>> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux