当前位置: 代码迷 >> PHP >> 生手上路(关于mysql_fetch_array)
  详细解决方案

生手上路(关于mysql_fetch_array)

热度:61   发布时间:2016-04-28 18:04:59.0
新手上路(关于mysql_fetch_array)
<?php
include 'con_db.php';
$sqlsl="SELECT * FROM `phptestdb`.`inputtest`";
$dbdate=mysql_query($sqlsl)or die(mysql_error());
while($list=mysql_fetch_array($dbdate)){
?>
<table width="400" height="200" border="5" >
    <tr>
        <td colspan="2" ><?=$list[content]?> </td>
    </tr>
    <tr>
        <td >用户:<?=$list[user]?> </td>
        <td >时间:<?=$list[date]?> </td>
    </tr>
<?php } ?>
</table>
___________________________________________________________________________________________________________________________________________________
测试提示:
undefined constant content - assumed 'content'
Use of undefined constant user - assumed 'user'
Use of undefined constant date - assumed 'date'

才刚上路,求知道的人指点,万分感谢!
------解决思路----------------------
<?=$list['content']?>
加上引号,其他类同
  相关解决方案