日期:2014-05-17 浏览次数:20727 次
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ page import="java.sql.*" %>
<%
request.setCharacterEncoding("gbk");
String telnum = request.getParameter("numcheck");
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
Class.forName("com.mysql.jdbc.Driver");
String url= "jdbc:mysql://localhost:3306/clientmanage?user=root&password=absolute";
conn = DriverManager.getConnection(url);
stmt = conn.createStatement();
rs = stmt.executeQuery("select * from clientlist where telnum = " + telnum);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>用户信息查询</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
th {background-color:#99CCFF}
</style>
<script language="javascript">
/****Check whether the number is empty****/
function check() {
if(document.checkclient.numcheck.value == "") {
alert("请输入号码");
return false;
}
else {
return true;
}
}
</script>
</head>
<body>
<form name="checkclient" action="checkok.jsp" method="post" onSubmit="return check()">
<div align="center">
手机号码:
<input type="text" name="numcheck">
<input type="submit" name="submit" value="查询">
</div>
</form>
<br><br>
<table width="700"align="center" border="5" bordercolor="#99CCFF" cellspacing="3" cellpadding="5">
<caption><h1 >用户信息</h1></caption>
<th>用户姓名</th>
<th>用户车牌</th>
<th>用户号码</th>