<?php require_once('Connections/users.php'); ?>
<?php
mysql_select_db($database_users, $users);
$query_Recordset1 = "SELECT * FROM users_table";
$Recordset1 = mysql_query($query_Recordset1, $users) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!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>
</head><body>
<p>&nbsp;</p>
<p>查看表数据:</p>
<p>&nbsp;</p><table border="1">
  <tr>
    <td>编号</td>
    <td>名字</td>
    <td>密码</td>
    <td>操作</td>
  </tr>  
  <?php do { ?>
    <tr>
      <td><?php echo $row_Recordset1['ID']; ?></td>
      <td><?php echo $row_Recordset1['NAME']; ?></td>
      <td><?php echo $row_Recordset1['PASS']; ?></td>
      <td><a href="insert_delete.php?<?php echo $row_Recordset1['ID']; ?>">删除</a></td>
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>测试没有返回任何数据,但是去phpmyadmin里看是有数据插入的,可是返回就是返回不了 

解决方案 »

  1.   

    Warning: mysql_fetch_assoc(): 4 is not a valid MySQL result resource in E:\xampp\htdocs\myphpsite\insert_ok.php on line 38
      

  2.   

    第33行是    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> 
      

  3.   

    $users这个是数据库连接吧 你都没有连接啊 还有 数据库你用变量 变量没赋值吧