|
Posted by Treefrog on 03/30/06 15:49
ally666 wrote:
> simply:
>
> Have the form post to submitted.php in there save the variables check
> which page it needs to be sent to and use the redirect function to call
> the relevant page..
I think by "redirect function" you mean header("Location: ...")? That
is not a good idea.
If the form is post, and contains a lot of data, then the redirect wont
work because it's a "get". You would need to use something like curl,
to re POST the data.
(may have to make the variables global, or it may
> still pick them up in the session i can't test at the moment.
eh? No, just use what ever you give to the script. Personally, I never
use globals, they're a sick idea and to be avoided like the plague.
> Think that should do what you require.
It will now ;o)
Also, you could change the form action using Javascript. Something
similar to:
<script language="javascript">
function subby_one()
{
document.aform.action="paul.php";
}
function subby_two()
{
document.aform.action="robert.php";
}
</script>
<form action="fred.php" id="aform">
<input type="button" name="butt" onclick="subby_one()">
<<input type="button" name="butt" onclick="subby_two()">
</form>
type of thing... I'm a "trial by error" type of javascript coder, so
that may take a few attempts to get right ;o)
Navigation:
[Reply to this message]
|