<?php $keywords = isset($_GET['keywords']) ? trim($_GET['keywords']) : ''; echo '查询关键词:'.$keywords; ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>PHP用户查询器</title> </head> <body> <h1>模糊查询技术之PHP用户查询器</h1> <form action="" method="get"> 用户名:<input type="text" name=”keywords“ value="" /> <input type="submit" values="提交查询"/> </form> </body> </html>