Re: Passing on POST data with Location:

This is a discussion on Re: Passing on POST data with Location: within the alt.comp.lang.php forums, part of the PHP Programming Forums category; "DUC" <dulum@eisa.net.au> wrote in message news:3f1487ae$1@news.comindico.com.au > ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-16-2003
^MisterJingo^
 
Posts: n/a
Default Re: Passing on POST data with Location:

"DUC" <dulum@eisa.net.au> wrote in message
news:3f1487ae$1@news.comindico.com.au
> Hi All,
>
> I want to redirect a page using the Location: header, and at the same
> time, pass any $_POST'ed data to that page.
>
> Does anyone know of a way?
>
> Thank You,
> DUC


Do you mean pass the data back to the page on which the form exists (which
takes the data from the user) or to pass the data to a new page using the
Location:header method?

If you want the former, simply make a self submitting form, a hidden field
could be used to detect the form has been submitted, so the new section of
html could be outputted rather than the form itself. If its the latter you
have a few options. The first is by attaching the variables to the
Header:location url as using the GET method i.e.
location.php?var1=$var1&var=$var2. If you don't want your address to contain
the variable data, the other method is by invoking a session for the
duration of calling the new page. once the new page is loaded, pull the data
from the session and if its no longer needed, simply destroy it.


Reply With Quote
  #2 (permalink)  
Old 07-18-2003
Sergiu
 
Posts: n/a
Default Re: Passing on POST data with Location:

I think the solution with the session vars is the better and the safest.

Sergiu.

"^MisterJingo^" <misterjingo@keysurf.net> wrote in message news:<od0Ra.1275$Fz2.667@news-binary.blueyonder.co.uk>...
> "DUC" <dulum@eisa.net.au> wrote in message
> news:3f1487ae$1@news.comindico.com.au
> > Hi All,
> >
> > I want to redirect a page using the Location: header, and at the same
> > time, pass any $_POST'ed data to that page.
> >
> > Does anyone know of a way?
> >
> > Thank You,
> > DUC

>
> Do you mean pass the data back to the page on which the form exists (which
> takes the data from the user) or to pass the data to a new page using the
> Location:header method?
>
> If you want the former, simply make a self submitting form, a hidden field
> could be used to detect the form has been submitted, so the new section of
> html could be outputted rather than the form itself. If its the latter you
> have a few options. The first is by attaching the variables to the
> Header:location url as using the GET method i.e.
> location.php?var1=$var1&var=$var2. If you don't want your address to contain
> the variable data, the other method is by invoking a session for the
> duration of calling the new page. once the new page is loaded, pull the data
> from the session and if its no longer needed, simply destroy it.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:44 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0