PHP 之 表单提交
1.创建 index.php 文件
<?php header("Content-type:text/html; charset=utf-8"); printf("Hi %s <br>",$_POST['name']); printf("The email address %s <br>",$_POST['email']);
2. xxx.html文件
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> </head> <body> <div data-role="page"> <div class="ui-content"> <form action="index.php" method="post"> Name: <input type="text" name="name"><br> E-mail: <input type="text" name="email"><br> <input type="submit" value="提交"> </form> </div> </div> </body>