php提交表单传值

form1.php

html页面:

<html>
<head>
  <title>测试表单提交传值的问题</title>
</head>
<body>

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

</body>
</html>

 

welcome.php

传递值,获取参数的页面

<html>
<body>

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

</body>
</html>

 

你可能感兴趣的:(php提交表单传值)