1. 在idea中直接创建相关代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单php交互</title>
</head>
<body>
<form action="http://localhost/MyService/Servic.php" method="post">
用户名:<input type="text" name="name">
密 码:<input type="password" name="password">
<br/>
<input type="submit" value="提交">
</form>
</body>
</html>
2. 在Eclipse中创建相关代码
<?php
echo "用户名:" .$_POST['name']. "<br>密码:" .$_POST['password'];