|
Posted by Carl on 10/17/97 11:50
these are three files below :
submit.html
<html>
<head>
</head>
<body>
<form action="redirect.php" method="POST" >
<input type="text" name="value" value="test" >
<input type="submit" >
</form>
</body>
</html>
redirect.php
<?php
header("HTTP/1.1 303 See Other");
header("Location: post.php");
?>
post.php
<html>
<head>
</head>
<body>
<?php
if(isset($_REQUEST['value'])) {
echo "the value is : <font color=RED >{$_REQUEST['value']}</font>";
}
?>
</body>
</html>
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? I use "apache http server
2.0.58" with "php 5" , "ms IE 6.0" and "firefox 1.5.0".
Navigation:
[Reply to this message]
|