从表单传递数据

 

a.php

<html>
<body>

<form action="b.php" method="post">
Name: <input type="text" name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>

</body>
</html>

 

b.php

<html>
<body>

Welcome <?php echo $_POST["name"]; ?>.<br />
You are <?php echo $_POST["age"]; ?> years old.

</body>
</html>

 

 

 

posted @ 2019-07-16 14:36  anobscureretreat  阅读(280)  评论(0编辑  收藏  举报