You are here: how to get values of a redirected a POST request ? « PHP Programming Language « IT news, forums, messages
how to get values of a redirected a POST request ?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация