<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" action="session.php">
<input type="text" name="txtname" value="" />
<input type="submit" name="submit" value="Submit" />
</form>
<?php
$count=0;
//if (!empty($_POST['submit']))
if (isset($_POST['submit']))
{
session_start();
//echo "Hello";
$count=1;
@$vname=$_POST['txtname'];
@$_SESSION['NAME']=$vname;
header("Location: /session1.php");
// header( "refresh:0; url=session1.php");
}
?>
</body>
</html>
它没有将我重定向到另一个页面n没有给我sassion变量的值我希望在点击按钮后重定向此页面,请帮助我