php 文本框里面显示数据库调出来的资料,,,在里面我标注了,,那个地方为什么是!=才能显示正确的数据库资料啊?我理解的是对比正确输出数据库内容的。大师貌似不知道为什么就写错了

<html>
<head>
<title>修改资料</title>
</head>
<form action="register_deal.php" method="post" name="myform" >
<table width="530" height="418" border="1" cellpadding="3" cellspacing="2" bordercolor="#66CC00" bgcolor="#FFFFFF">
      <tr>
        <td width="516" height="412" valign="top" background="images/bg.jpg"><table width="516" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="161" height="74">&nbsp;</td>
            <td width="345">&nbsp;</td>
            <td width="10">&nbsp;</td>
          </tr>
        <?php
        include"conn.php";
      $search2="111";//按员工编号查找 ,,具有唯一性
      $sql="SELECT * FROM data where Y_Emp_ID='".$search2."'";
      $result=mysql_query($sql);
      $num=mysql_num_rows($result); //数据库有几条数据
      if($num!=0)
    {
         while($row=mysql_fetch_array($result) )
         {         
            $Y_Emp_ID=$row[Y_Emp_ID ];
            $Y_Card_ID=$row[Y_Card_ID];
            $Y_Emp_Name=$row[Y_Emp_Name];
            $Y_Emp_Gender=$row[Y_Emp_Gender];
            $Y_Emp_PeoID=$row[Y_Emp_PeoID];
            $Y_Emp_Home=$row[Y_Emp_Home];
            $Y_Emp_Phone=$row[Y_Emp_Phone];
            $Y_Emp_Email=$row[Y_Emp_Email];
            $Y_Emp_Job=$row[Y_Emp_Job];
            $Y_Emp_DepA=$row[Y_Emp_DepA];
            
       }
       echo $Y_Emp_ID.$Y_Card_ID.$Y_Emp_Name;
    }
      else 
      {
          echo"打开表失败";
      }
  ?>

<tr>
            <td width="32%" height="23" align="center">员工编号:</td>
            <td width="68%"><input name="Y_Emp_ID" type="text" id="Y_Emp_ID" size="20"value="<?php echo $Y_Emp_ID ?>">*</td>
          </tr>
          <tr>
            <td width="32%" height="23" align="center">员工卡号:</td>
            <td width="68%"><input name="Y_Card_ID" type="text" id="Y_Card_ID" size="20"value="<?php echo $Y_Card_ID ?>">*</td>
          </tr>
          <tr>
            <td height="22" align="center">姓&nbsp;&nbsp;&nbsp;&nbsp;名:</td>
            <td height="22"><input name="Y_Emp_Name" type="text" id="Y_Emp_Name" size="20"value="<?php echo "$Y_Emp_Name"?>">*</td>
          </tr>
          <tr>
            <td height="18" align="center">性&nbsp;&nbsp;&nbsp;&nbsp;别:</td>
            <td height="18"><input name="Y_Emp_Gender" type="text" id="Y_Emp_Gender" size="20"value="<?php echo $Y_Emp_Gender ?>">* </td>
          </tr>
          <tr>
            <td height="19" align="center">身份证号:</td>
            <td height="19"><input name="Y_Emp_PeoID" type="text" id="Y_Emp_PeoID" size="20"value="<?php echo $Y_Emp_PeoID ?>">*</td>
          </tr>
          <tr>
            <td height="19" align="center">家庭住址:</td>
            <td height="19"><input name="Y_Emp_Home" type="text" id="Y_Emp_Home" size="30"value="<?php echo $Y_Emp_Home ?>"></td>
          </tr>
          <tr>
            <td height="19" align="center">私人电话:</td>
            <td height="19"><input name="Y_Emp_Phone" type="text" id="Y_Emp_Phone" size="30"value="<?php echo $Y_Emp_Phone ?>" ></td>
          </tr>
          <tr>
            <td height="19" align="center">邮&nbsp;&nbsp;&nbsp;&nbsp;箱:</td>
            <td height="19"><input name="Y_Emp_Email" type="text" id="Y_Emp_Email" size="30" value="<?php echo $Y_Emp_Email ?>">*</td>
          </tr>
          <tr>
            <td height="19" align="center">职&nbsp;&nbsp;&nbsp;&nbsp;位:</td>
             <td height="19"><input name="Y_Emp_Job" type="text" id="Y_Emp_Job" size="10" value="<?php echo $Y_Emp_Job ?>"></td>
          </tr>
          <tr>
             <td height="19" align="center">部&nbsp;&nbsp;&nbsp;&nbsp;门:</td>
             <td height="19"><input name="Y_Emp_DepA" type="text" id="Y_Emp_DepA" size="10" value="<?php echo $Y_Emp_DepA ?>"></td>
          </tr>

<td height="34">&nbsp;</td>
<td class="word_grey">&nbsp;&nbsp;
<input name="submit" type="submit" class="btn_grey" value="提交" onClick="return check()">&nbsp;
<input name="submit2" type="reset" class="btn_grey" value="重填"></td></tr>
              </table>
           </td>
            <td>&nbsp;</td>
          </tr>

</table>
</form>
</body>
</html>

php 文本框里面显示数据库调出来的资料的更多相关文章

  1. HTML之文本框关键字显示

    文本框默认显示 "请输入关键字",当鼠标点击输入框的时候, "请输入关键字"这几个字消失,移出文本框又显示出来 <!DOCTYPE html> &l ...

  2. Jquery中复选框选中取消实现文本框的显示隐藏

    标签内容 <div class="box"> 请编写javascript代码,完成如下功能要求:<br /> 1.取消复选款后,要求促销价格.促销开始结束日 ...

  3. 设置文本框左边显示的View

    效果:

  4. input 文本框自动显示光标

    使用$("#votetitle").focus();没起作用 使用document.getElementById("votetitlechild").focus ...

  5. js实现文本框自动显示两位小数

    转自https://blog.csdn.net/qiji2011/article/details/81270552 1.js: //保留2位小数,如:2,会在2后面补上00.即2.00 functio ...

  6. 【MFC】MFC文本框中显示浮点数

    CString strNumber; strNumber.Format("%0.2f",tim.getTimeMilli()); SetDlgItemText(IDC_TIME_U ...

  7. iOS 9应用开发教程之显示编辑文本标签文本框

    iOS 9应用开发教程之显示编辑文本标签文本框 ios9显示.编辑文本 在iOS,经常会看到一些文本的显示.文字就是这些不会说话的设备的嘴巴.通过这些文字,可以很清楚的指定这些设备要表达的信息.本节将 ...

  8. Easyui datebox单击文本框显示日期选择 eayui版本1.5.4.1

    Easyui默认是点击文本框后面的图标显示日期,体验很不好,所以我想单击文本框就显示日期选择框,网上很多版本是1.3,1.4的,于是自己就比葫芦画瓢改了一个1.5.4.1的版本. 我参考了网上这个帖子 ...

  9. TextField文本框

    1)失去第一响应者状态方法(即关闭键盘) 要先将视图view的底层类设置为UIControl类 再设置view的touch down事件,在事件中写入以下方法 [self.textField resi ...

随机推荐

  1. Win7系统中MS SQLServer 2005 无法连接

    今天重装了一下Win7系统,数据库自然也重新装了一下.谁知道竟然无法连接,使用通用的解决问题方法一一测试: 1.启动数据库主要服务(因为我安装时取消了自动启动),也无法连接: 2.查看,windows ...

  2. 如何在 Debian / Ubuntu 服务器上架设 L2TP / IPSec VPN

    本站的 Rio 最近在一台 Ubuntu 和一台 Debian 主机上配置了 L2TP / IPSec VPN,并在自己的博客上做了记录.原文以英文写就,我把它大致翻译了一下,结合我和 Rio 在设置 ...

  3. 通过C#去调用C++编写的DLL

    这个问题缠了我2个小时才弄出来,其实很简单.当对方提供一个dll给你使用时,你需要去了解这个dll 是由什么语言写的,怎么编译的,看它的编译类型.这样即使在没有头绪时,你可以先尝使用一些比较热门的编译 ...

  4. ios专题 - GCD(1)

    什么是GCD? Grand Central Dispatch或者GCD,是一套低层API,提供了一种新的方法来进行并发程序编写.从基本功能上讲,GCD有点像 NSOperationQueue,他们都允 ...

  5. 理解java Web项目中的路径问题

    本文以项目部署在tomcat服务器为例,其他相信也是一样的. 先说明请求页面的写法,在web中,页面路径主要写的有以下几种 1.请求重定向 2.浏览器的请求被服务器请求到新页面(我称为“转发”) 3. ...

  6. C/C++中文的编码和字符串处理

    windows平台 char 表示单字符,占用一个字节 wchar_t 表示宽字符,占用两个字节 Linux平台 char 占用一个字节 wchar_t 占用四个字节 windows平台下对于用字符串 ...

  7. Zend Studio 11.0.2 破解和汉化

    本方法适用于Zend Studio 11.0.2,亲测,其他版本未知. 破解方法:覆盖安装目录 plugins 里同名文件,启动任意输入即可注册. Windows版下载地址:http://downlo ...

  8. 更改input【type=file】样式

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  9. 修改虚拟机linux硬盘的大小

    一.概述 Ubuntu用了一段时间,系统已从原来的4G增长到8G,导致虚拟磁盘不够用,需要修改虚拟硬盘的大小. 但是,修改虚拟机硬盘的大小不像修改内存那么简单,操作一个滑动条就轻松搞定.要知道虚拟硬盘 ...

  10. Scut 上线后遇到的问题

    1. 上线后的大并发问题: var sem = new Semaphore(_accepts, _accepts); while (true) { sem.WaitOne(); #pragma war ...