RE: Header() - POST

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

 



> -----Original Message-----
> From: Dan Joseph [mailto:dmjoseph@xxxxxxxxx]
> Sent: Friday, September 05, 2008 11:16 AM
> To: php-general@xxxxxxxxxxxxx
> Subject: Re:  Header() - POST
> 
> On Fri, Sep 5, 2008 at 12:11 PM, Boyd, Todd M. <tmboyd1@xxxxxxxx>
> wrote:
> 
> > > -----Original Message-----
> > > From: Dan Joseph [mailto:dmjoseph@xxxxxxxxx]
> > > Sent: Friday, September 05, 2008 10:59 AM
> > > To: PHP General
> > > Subject: Re:  Header() - POST
> > >
> > > On Fri, Sep 5, 2008 at 11:48 AM, Wolf <lonewolf@xxxxxxxxx> wrote:
> > >
> > > > <!-- SNIP -->
> > > > > scrubbing them, and rebuidling the post string and trying to
> > > resubmitt it
> > > > > using headers().  I'm getting this error:
> > > >
> > > > Why do you want to re-submit it?
> > > >
> > > > Why not just parse it in the same page?
> > > >
> > > > If not that, then use sessions and set the information, do a
> meta-
> > > refresh
> > > > to redirect to the processing page, then use the processing page
> to
> > > pull the
> > > > session information and make sure it came from the correct page.
> > > >
> > > > HTH,
> > > > Wolf
> > > >
> > >
> > > Hmm good question on why I am re-submitting to a new page.
> Honestly,
> > I
> > > have
> > > no good answer for that other than I have been rushing this part
of
> > the
> > > system for two days to get it done.
> > >
> > > I didn't think of Sessions, that's actually not a bad idea at all.
> I
> > > am
> > > going to re-think the re-submitting thing, and if I stick with it,
> > I'll
> > > give
> > > our session idea a shot.
> >
> > I think what Wolf was getting at is... if the data you're scrubbing
> is
> > being re-submitted to the same page, why re-submit it at all? Why
not
> > just scrub it and then do whatever it is you want to do with it
> instead
> > of putting an extra step in-between?
> >
> > I see your model like this:
> > 1.) Get POST data
> > 2.) Scrub POST data
> > 3.) Re-submit POST data
> > 4.) Deal with POST data
> >
> > Whereas I'm getting at this:
> > 1.) Get POST data
> > 2.) Scrub POST data
> > 3.) Deal with POST data
> >
> >
> > Todd Boyd
> > Web Programmer
> >
> >
> >
> >
> I'm actually not posting back to the same page, I was posting to a
> different
> one.  Which still, when he mentioned it, it didn't make sense why I am
> doing
> that.  I am in agreement with you and Wolf.  I should just scrub it
and
> deal
> with it, not re-submit it off to another place.

On a side note... in the future, if you find that a particular process
calls for POSTing to a different page, the cURL library (which I believe
is now included with PHP by default in v5.x+) can accomplish a plethora
of wonderful stuff that would ordinarily be handled by a browser
(POSTing, basic HTTP authentication, SSL certs, etc.).


Todd Boyd
Web Programmer




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