<?php
$id=$_GET["id"];
include ("../../mysqlconn.php");$sql=mysql_query ("select * from employees where id = '". $id. "'",$conn);
$result=mysql_fetch_array ($sql);
if ($result!=false)
{
echo $sql;
echo $id;
//echo "<script language='javascript'> alert('此员工档案不存在');history.back();</script>";
}
else{
?><html
xxxxx
</html><?php
}
?>1.include文件肯定存在
2.数据库中明明有数据,我用phpmyadmin进行 SELECT * FROM `employees` WHERE where id=1 是可以得到数据的
3.现在的结果是不能显示 <html 这些代码请问我错在哪里?
$id=$_GET["id"];
include ("../../mysqlconn.php");$sql=mysql_query ("select * from employees where id = '". $id. "'",$conn);
$result=mysql_fetch_array ($sql);
if ($result!=false)
{
echo $sql;
echo $id;
//echo "<script language='javascript'> alert('此员工档案不存在');history.back();</script>";
}
else{
?><html
xxxxx
</html><?php
}
?>1.include文件肯定存在
2.数据库中明明有数据,我用phpmyadmin进行 SELECT * FROM `employees` WHERE where id=1 是可以得到数据的
3.现在的结果是不能显示 <html 这些代码请问我错在哪里?
解决方案 »
- php 用count(*)无法获取sql总数
- 想听听大家对于c与php关系的看法
- Fatal error: Cannot instantiate non-existent class: domdocument in d:\usr\www\html\test\to.php on line 10
- 100分求半角转换全角函数。
- 电子商城的产品图片上传怎么解决
- 关于双引号和单引号多层嵌套
- 菜鸟级问题,请问这个小程序在哪定义变量,在线等....
- session问题!很简单,看看吧
- 如何实现图像文件复制?
- 时间比较的问题
- unix下面 phpmailer 出现 Could not connect to SMTP host 问题,该怎么解决呢?要简单易懂的方法~~~~~
- 博客安装时显示Specified key was too long
echo $id;,这两句应该显示