1,form.php文件内容如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>Insert title here</title>
</head>
<body>
<form action="Demo2.php" method="post">
<input type="text" name="username" />
<input type="submit" value="提交"/>
</form>
</body>
</html>
2接受表单数据的Demo2.php内容如下:
<?php
$username=$_POST["username"];
echo $username;
?>