|
Posted by NC on 10/12/46 11:50
Carl wrote:
>
> these are three files below :
[Snippets deleted]
> When I submit, it does redirect to 'post.php', but it doesn't show
> "test". If I change the submit.html to use the "GET" method ,and append
> "?value={$_GET['value']}" to the url int the redirect.php, it works
> well. Why the "POST" method doesn't work?
Because redirection uses the GET method.
You should consider either including post.php into redirect.php or
saving the POSTed values into session variables:
redirect.php
<?php
session_start();
$_SESSION = $_POST;
header("HTTP/1.1 303 See Other");
header("Location: post.php");
?>
post.php
<?php
session_start();
if(isset($_SESSION['value'])) {
echo "the value is : <font color=RED >{$_SESSION['value']}</font>";
}
?>
Cheers,
NC
Navigation:
[Reply to this message]
|