首页 > 代码库 > PHP 提交表单

PHP 提交表单

 

//在1.PHP文件中:

<!DOCTYPE html>
<html>
<body>
<form action="2.php" method="post">
name: <input type="text" name="name"><br>
email:<input type="text" name="email"><br>
<input type= "submit">
</form>
</body>
</html>

 

//2.PHP

<html>
<body>
your name is: <?php echo $_POST["name"];?><br>
your adress is :<?php echo $_POST["email"];?><br>
</body>
</html>

PHP 提交表单