<?
session_start();
if($_POST['cmd']=="go"){
$name=$_POST['name'];
$_SESSION['name']=$name;
header("Location:sss.php");
}
?>
<head></head>
<body>
<table>
<form action="test.php" method="post">
<input type="hidden" name="cmd" value="go" />
<tr>
<td><input type="text" name="name" /></td>
</tr>
<tr>
<td><input type="submit" name="tj" /></td>
</tr>
</form>
</table>
</body>
</html>首先。你要指明method方式。你为空的话默认为get方式.所以你post是取不到值的。