没有合适的资源?快使用搜索试试~ 我知道了~
首页PHP+MySQL实现模糊查询员工信息功能示例
资源详情
资源评论
资源推荐

PHP+MySQL实现模糊查询员工信息功能示例实现模糊查询员工信息功能示例
主要介绍了PHP+MySQL实现模糊查询员工信息功能,结合实例形式分析了php连接mysql数据库及使用like语句
进行模糊查询与显示相关操作技巧,需要的朋友可以参考下
本文实例讲述了PHP+MySQL实现模糊查询员工信息功能。分享给大家供大家参考,具体如下:
一、代码一、代码
注意两点:注意两点:
1、用Notepad+编辑时,格式选择:【编码字符集】->【中文】->【gb2312】
2、
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
conn.php
<?php
$connID=mysql_connect("localhost","root","root");
mysql_select_db("db_database13", $connID);
mysql_query("set names gbk");
?>
index.php
<?php session_start(); include("conn/conn.php");?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> 查询企业员工的详细信息</title>
<style type="text/css">
<!--
.STYLE4 {font-size: 13px}
.STYLE5 {font-family: "华文琥珀"; font-size: 20px;}
.STYLE6 {color: #990000}
-->
</style>
</head>
<body>
<table width="450" height="28" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="STYLE5 STYLE6">查询企业员工的详细信息</td>
</tr>
</table>
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<table width="450" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#990000">
<tr>
<td width="176" align="center" bgcolor="#FFFFFF"><span class="STYLE1 STYLE4">按照员工的编号查询</span></td>
<td width="182" bgcolor="#FFFFFF"><input name="number" type="text" id="number" /></td>
<td width="84" height="25" bgcolor="#FFFFFF"><input type="hidden" name="flag" value="1" /><input name="submit" type="submit" value="提交" /></td>
</tr>
</table>
</form>
<table width="450" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#990000">
<tr>
<td width="67" align="center" bgcolor="#FFFFFF" class="STYLE4">编号</td>
<td width="72" align="center" bgcolor="#FFFFFF" class="STYLE4">姓名</td>
<td width="119" align="center" bgcolor="#FFFFFF" class="STYLE4">电话</td>
<td width="182" height="25" align="center" bgcolor="#FFFFFF" class="STYLE4">地址</td>
</tr>
<?php
if(isset($_POST["flag"]))
{
$query=mysql_query("select * from tb_employee where number like '%".$_POST["number"]."%'");
if($query)
{
while($myrow=mysql_fetch_array($query))
{
?>
<tr>
<td align="center" bgcolor="#FFFFFF" class="STYLE4"><span class="STYLE2"><?php echo $myrow[number];?></span></td>
<td align="center" bgcolor="#FFFFFF" class="STYLE4"><span class="STYLE2"><?php echo $myrow[name];?></span></td>
<td height="23" align="center" bgcolor="#FFFFFF" class="STYLE4"><span class="STYLE2"><?php echo $myrow[tel];?></span></td>
<td height="23" align="center" bgcolor="#FFFFFF" class="STYLE4"><span class="STYLE2"><?php echo $myrow[address];?></span></td>

















weixin_38643127
- 粉丝: 8
- 资源: 921
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- Xilinx SRIO详解.pptx
- Informatica PowerCenter 10.2 for Centos7.6安装配置说明.pdf
- 现代无线系统射频电路实用设计卷II 英文版.pdf
- 电子产品可靠性设计 自己讲课用的PPT,包括设计方案的可靠性选择,元器件的选择与使用,降额设计,热设计,余度设计,参数优化设计 和 失效分析等
- MPC5744P-DEV-KIT-REVE-QSG.pdf
- 通信原理课程设计报告(ASK FSK PSK Matlab仿真--数字调制技术的仿真实现及性能研究)
- ORIGIN7.0使用说明
- 在VMware Player 3.1.3下安装Redhat Linux详尽步骤
- python学生信息管理系统实现代码
- 西门子MES手册 13 OpcenterEXCR_PortalStudio1_81RB1.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0