Click here to get back home

Redirect with POST

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Redirect with POST ania.malicka85 07-20-2008
Get Chitika Premium
Posted by ania.malicka85 on July 20, 2008, 5:32 pm
Please log in for more thread options
Hello,

I am playing with automatic redirection with PHP. As with GET is
fairly simple (<meta http-equiv="refresh" content="3;url="http://
www.google.com/search?q=php">

how can I do similar thing with POST (lets assume that I want to add q
= php to post variables). How can I do this?

regards, Ann

Posted by macca on July 20, 2008, 7:05 pm
Please log in for more thread options
You cant.

If you want to pass POST variables to a page you either have to post
them, as in submit a form, or use cURL through PHP.

Posted by ania.malicka85 on July 21, 2008, 4:57 am
Please log in for more thread options
Hello,

> If you want to pass POST variables to a page you either have to post
> them, as in submit a form, or use cURL through PHP.

Thank you! I tried both methods, but:
- when I used html form, I must click a button to proceed (and I want
automatic redirection after 5 seconds). Can I simulate somehow submit
click on this form?

- when I used cURL functions (e.g. saved in file redirect.php) and
want to pass POST variables to show.php it works okay (to delay I used
sleep(5), but in the browser the original url (redirect.php) is saved
and not changed to show.php. Any idea how to make that change?

Regards, Ann

Posted by The Natural Philosopher on July 21, 2008, 6:07 am
Please log in for more thread options
ania.malicka85@gmail.com wrote:
> Hello,
>
>> If you want to pass POST variables to a page you either have to post
>> them, as in submit a form, or use cURL through PHP.
>
> Thank you! I tried both methods, but:
> - when I used html form, I must click a button to proceed (and I want
> automatic redirection after 5 seconds). Can I simulate somehow submit
> click on this form?
>

Yes. Javascript can execute a submit operation. Ni odea how to time it tho.


> - when I used cURL functions (e.g. saved in file redirect.php) and
> want to pass POST variables to show.php it works okay (to delay I used
> sleep(5), but in the browser the original url (redirect.php) is saved
> and not changed to show.php. Any idea how to make that change?
>

Never used CURL - pass. In javascript the problem is soluble p[retty simply.

> Regards, Ann

Posted by Ulf Kadner on July 21, 2008, 6:17 am
Please log in for more thread options
ania.malicka85@gmail.com wrote:
> I am playing with automatic redirection with PHP. As with GET is
> fairly simple (<meta http-equiv="refresh" content="3;url="http://
> www.google.com/search?q=php">
>
> how can I do similar thing with POST (lets assume that I want to add q
> = php to post variables). How can I do this?

You have to save youre submited Post-Data into the Session. After
Redirection you can access it there.

So long, Ulf

Similar ThreadsPosted
Post with redirect? December 14, 2007, 7:26 am
old question (perhaps): redirect with POST of data? March 16, 2005, 11:04 am
How can I redirect and pass the POST data? March 3, 2006, 8:44 pm
redirect / new website how to redirect old (google) links to new site ? November 7, 2006, 3:22 am
redirect to directory - php redirect or htaccess? June 25, 2006, 7:17 pm
PHP Post, then HTML Post? November 24, 2004, 5:54 pm
Redirect September 23, 2004, 11:09 pm
Redirect March 6, 2005, 6:34 pm
php redirect June 21, 2005, 8:23 am
redirect October 10, 2005, 3:50 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap