新手上路(关于mysql_fetch_array)

WBOY
Release: 2016-06-23 13:42:52
Original
1104 people have browsed it

include 'con_db.php';
$sqlsl="SELECT * FROM `phptestdb`.`inputtest`";
$dbdate=mysql_query($sqlsl)or die(mysql_error());
while($list=mysql_fetch_array($dbdate)){
?>


    
        
    
    
        
        
    

=$list[content]?> 
用户:=$list[user]?>  时间:=$list[date]?> 

___________________________________________________________________________________________________________________________________________________
测试提示:
undefined constant content - assumed 'content'
Use of undefined constant user - assumed 'user'
Use of undefined constant date - assumed 'date'

才刚上路,求知道的人指点,万分感谢!


回复讨论(解决方案)

=$list['content']?>
加上引号,其他类同

=$list['content']?>
加上引号,其他类同


谢谢,加了引号就好了。太粗心了
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!