RE: Re: post & redirect

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

 



hello,
I created  little script in PHP 5 in which I entered the following line

<form name="transfert" method="post" action="wogl_transfert.php">
<input name="rep_final" type="hidden" value="<?=$rep_final?>">
<input name="rep_source" type="hidden" value="<?=$rep_source?>">
<input type="submit" value="TRANSFERT">

the "hidden" input helped me to keep the rep_source variable with the same
value in the next page than in the new page.

I'm not a specialist but it has been working well until today.

Olivier
energize!

-----Message d'origine-----
De : Matthew Weier O'Phinney [mailto:matthew@xxxxxxxxxx]
Envoyé : mercredi 20 avril 2005 04:39
À : php-general@xxxxxxxxxxxxx
Objet :  Re: post & redirect


* Jem777 <camillo@xxxxxxxxx>:
> If I submit a post and then, serverside, I redirect the request to another
> page, do the post variables still live in the new page?

No. HTTP requests are stateless, meaning they have no memory of what
requests happened before or after, or how those requests were made. PHP
does not affect that behaviour at all; it's entirely a matter of the
HTTP protocol.

If you want the POST variables to propogate to the redirected page, use
a session.

--
Matthew Weier O'Phinney           | WEBSITES:
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org
mailto:matthew@xxxxxxxxxx         | http://vermontbotanical.org

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

-- 
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