Forum Moderators: open
<form action="/index2.php"...
Since you are using PHP, there are other ways.
1) You could send all the POST params to the next page via GET, like so:
<?php
$url = "/index2.php?r=1";
foreach($_POST as $key => $val) $url .= "&".$key."=".$val;
header("Location: ".$url);
exit;
?>
You may need to alter the script to use the GET params, rather than POST. This depends on whether register_globals is on or off.
2) Use PHP to rebuild the form and then auto-submit with JavaScript:
<?php
$form = "";
foreach($_POST as $key => $val){
$form .= "<input type=\"hidden\" name=\"".$key."\" value=\"".$val."\">";
}
?>
<html>
<head>
<script type="text/javascript">
window.onload = document.forms[0].submit();
</script>
</head>
<body>
<form action="/index2.php" method="post">
<?php print $form;?>
</form>
</body>
</html>