html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
</head>
<body>
<div>
<form action="baoming.php" method="post">
<!-- <form action="baoming.php" method="post"> -->
firstname: <input type="text" name="firstname" id="firstname">
lastname:<input type="text" name="lastname" id="lastname">
email: <input type="text" name="email" id="email">
<input type="submit" value="提交">
</form>
</div>
</body>
<script src="./ajax.js"></script>
</html>
<?php
$servername = "localhost";
$username = "yiban";
$password = "123456