⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 find.php

📁 php +mysql+apeach实现在线通讯录。功能:添加
💻 PHP
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>查询页面</title>
<style type="text/css">
<!--
.STYLE1 {
	font-family: "Courier New", Courier, monospace;
	font-weight: bold;
}

-->
</style>
<style type="text/css">

a:link{cursor: hand; font-size: 11pt ; color: #3C3C3C;  }
a:active{  cursor: hand; font-size: 11pt ;color: 333399; }
a:hover{  cursor: hand; font-size: 11pt ; color:#3300FF; background:#666699;}
a:visited{  cursor: hand; font-size: 11pt ;color: #000000; text-decoration:none }

</style>
</head>

<body text="#5E5E5E" >
<div class="s">
<?
include("head.inc");
if(!$_POST[find_value]||!$_POST[find_name])//空
{
?>
<form id="form" name="form" method="post" action="find.php">
<table width="200" border="1" cellpadding="2" cellspacing="0" align="center">
  <tr>
    <th scope="row"bgcolor="E7E7E7">
	<div align="center">查询项&nbsp;&nbsp;
      <select name="find_name">
             <option value="">-----</option>
              <option value="name">姓名</option>
              <option value="user_id">用户名</option>
              <option value="birth_y">出生年</option>
              <option value="birth_m">出生月</option>
              <option value="birth_d">出生日</option>
              <option value="idtify">身份证</option>
           <option value="phone">电话</option>
              <option value="hobby">兴趣</option>
              <option value="address">地址</option>
            </select></div>
</th>
  </tr>
  <tr>
    <th scope="row"bgcolor="E7E7E7"><div  align="center">查询值&nbsp;&nbsp;
      <input type="text" name="find_value" size="8" />
    </div></th>
  </tr>
  <tr>
    <th scope="row"bgcolor="E7E7E7"><div align="center"><input type="submit"  name="submit" value="查询"></div></th>
  </tr>
</table>
</form>
<?
}
else 
{


    //echo $_POSTa[find_value].$_POST[find_name];
 

 
  include("db_start.inc");
  $sql="SELECT * FROM `web_user` WHERE $_POST[find_name]  like '%$_POST[find_value]%'";

  $result = mysql_query($sql);?>
        <h3 class="STYLE1" align="center">  查询结果下</h3>
        <table width="800"  border="1" class="s" cellspacing="0" align="center" >
 <tr bgcolor="#E7E7E7">
<td width="70"><div class="s" class="STYLE2">姓名</div></td> 
<td width="100"> <div class="s" class="STYLE2"><span class="STYLE2">生日</span></div></td>  
<td width="100"> <div class="s" class="STYLE2">电话</div></td> 
<td width="170"><div class="s" class="STYLE2">身份证</div></td> 
<td width="170"> <div class="s" class="STYLE2">兴趣</div></td> 
<td width="150"> <div class="s" class="STYLE2">住址</div></td> 
<td width="40"><div class="s" class="STYLE2">其他 </div>  </td>
</tr>
<tr>
<td colspan="7" height="3"></td>
</tr>
  <?
  
   //if(!$row) echo "<p>没符合你查询的记录!</p>"; 
  while($row=mysql_fetch_row($result))
  {
  ?>
  
<tr bgcolor="#EFEFEF" height="25" >
<td width="70"><div class="s"><a href="detial.php?id=<? echo $row[0];?>"><? echo $row[2];?></a></div></td> 
<td width="100"> <div class="s"><span class="STYLE2"><? echo $row[4]."/".$row[5]."/".$row[6];?></span></div></td>  
<td width="100"> <div class="s"><span class="STYLE2"><? echo $row[8];?></span></div></td> 
<td width="170"><div class="s"><span class="STYLE2"><? echo $row[11];?></span></div></td> 
<td width="170"> <div class="s"><span class="STYLE2"><? echo $row[7];?></span></div></td> 
<td width="150"> <div class="s"><span class="STYLE2"><? echo $row[12];?></span></div></td> 
<td width="40">
 <form id="form1" name="form1" method="post" action=" delete.php">
  
  <input type="checkbox" name="test[]" value="<? echo $row[0];?>" />

</td>
</tr>

 <?
   }
   ?>
  
   <?
  if($_COOKIE[test]==jixian)
{  

?>

<?

}
?>
<?
}
?>


</table>
<div align="center"><input type="submit" name="delete" value="删除" />
</form>

<a href="show.php">返回</a>
<a href="index.php">主页</a></div>
</div>

</br>
<?  include("copyright.inc");?>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -