redirecting POST data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
styrmstread
Forum Newbie
Posts: 4
Joined: Mon Sep 29, 2003 11:09 am

redirecting POST data

Post by styrmstread »

hello all,
is there a way to redirect POST data to another page without having to hit a submit button?
So, in other words, a form is submitted to one script, that script executes and then redirects the data to another url?
Thanks,
Styrmstread
junky
Forum Commoner
Posts: 30
Joined: Wed Sep 03, 2003 3:58 pm

Post by junky »

i would try in these steps:
in ur page: include "another_page.php"
and in ur another_page.php ya'll be able to get ur hash $_POST (i guess).
try it and gimme some feed-back.
thanks.
styrmstread
Forum Newbie
Posts: 4
Joined: Mon Sep 29, 2003 11:09 am

Post by styrmstread »

thank you, but the problem is that it is going to a completely different server and actually hitting an ASP/SQL script. So, I can't just include a file. I need a way to actually redirect the entire POST set to a different URL. Thanks again,
Styrmstread
junky
Forum Commoner
Posts: 30
Joined: Wed Sep 03, 2003 3:58 pm

Post by junky »

and with a header(Location, "url") wont send to post vars too?
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Post by Cruzado_Mainfrm »

i think you can send the form with the post vars like this:

Code: Select all

<script language="Javascript">
function submitform() &#123;
document.forms&#1111;0].submit();
&#125;
</script>
I think that's the code, be sure to change forms[X] where X is the number of the form in order from top to bottom.

to use it,: onEvent = "javascript: submitform();"
Post Reply