簡單PHP留言板之五 留言列表

2021-09-08 16:20:37 字數 560 閱讀 6842

檔名:list.php

說明:mysql_fetch_array()

mysql_fetch_array(data,array_type)函式從結果集中取得一行作為關聯陣列,或數字陣列,或二者兼有

返回根據從結果集取得的行生成的陣列,如果沒有更多行則返回 false。

data      可選。規定規定要使用的資料指標。該資料指標是 mysql_query() 函式產生的結果。

array_type  可選。規定返回哪種結果。可能的值:mysql_assoc - 關聯陣列;mysql_num - 數字陣列;mysql_both - 預設。同時產生關聯和數字陣列

<?php

include("conn.php");

include("head.php");

$sql="select * from `message` order by id desc";

$query=mysql_query($sql

);

while($row=mysql_fetch_array($query

))?>

php學習之留言板

在對php語法有一定了解之後開始,這是第乙個php練手專案,涵蓋的知識有 root addmess.php delmess.php index.php show.php commom view head.html common lyfile.php css bootstrap.min.css dat...

PHP製作留言板

首先造乙個登入頁面 上圖 然後來寫處理頁面 session start session儲存資料 include db.class.php 引用類 db new db 造方法 zhang post zhang mi post mi sql select mi from yuangong where z...

PHP 留言板練習

登入頁面同session一樣 login頁面 loginchuli頁面 session start uid post uid pwd post pwd include dbda.php db new dbda sql select count from yuangong where username...