You are here: Re: POST variables with a form « PHP Programming Language « IT news, forums, messages
Re: POST variables with a form

Posted by Rik on 08/01/07 19:25

On Wed, 01 Aug 2007 20:09:27 +0200, Gav <gc@dentrassis.com> wrote:
> I'm wanting to send POST data to a script, but without it being sent via
> the action of a form being posted

Which is perfectly possible using CURL or more wordy with a normal
fsockopen/fwrite.

> - in other words I want to re-direct
> to a page but have the POST data filled in for the page to deal with.

The redirection is not really possible: the client doesn't know what post
request to send, and at any rate: posts aren't send anymore on a redirect

> Is there a way to do this without using Session control?
> I don't really want to go and change a whole bunch of old scripts to
> implement sessions, so I was hoping to be able to use something like
> header() to fill in the $_POST array before redirecting.

Nope. If however the receiving script has the same domain, you can just
request the page yourself on the server and output that directly to the
user (possibly including headers). Perfectly possible, but a nightmare for
relative links. You could consider trying to force a <base> tag in the
head, but I'd call it far from reliable. And your page is offcourse not
bookmarkable at all.

--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация