Posted by Lόpher Cypher on 01/03/06 16:02
David W wrote:
> How can I make a redirection (like a header('Location:/xxx') ) with
> post values ?
>
In XHTML:
<form action="redirect.php" method="post">
<input type="hidden" name="url" value="/foo.php" />
<input type="submit" value="Redirect Now!" />
</form>
In redirect.php:
<?php
$url = $_POST["url"];
if (!isset($url) || $url == "") {
echo "No URL to redirect to!";
exit;
}
header("Loadcation: $url");
?>
--
- lΓΌpher
---------------------------------------------
"Man sieht nur das, was man weiΓ" (Goethe)
[Back to original message]
|