Page 1 of 1
redirecting POST data
Posted: Mon Sep 29, 2003 4:51 pm
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
Posted: Mon Sep 29, 2003 5:12 pm
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.
Posted: Mon Sep 29, 2003 5:57 pm
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
Posted: Mon Sep 29, 2003 6:03 pm
by junky
and with a header(Location, "url") wont send to post vars too?
Posted: Mon Sep 29, 2003 6:55 pm
by Cruzado_Mainfrm
i think you can send the form with the post vars like this:
Code: Select all
<script language="Javascript">
function submitform() {
document.formsї0].submit();
}
</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();"