时间:2021-07-01 10:21:17 帮助过:15人阅读
顯示所有記錄
帳號密碼顯示表
require_once("mysql.php");
$link = create_connection();
$sql = "SELECT no AS '編號',username AS '帳號',password AS '密碼' FROM root";
$result = execute_sql("os", $sql, $link);
echo "
" . mysql_fetch_field($result, $i)->name. " | ";
" . mysql_result($result, $j, $k) . " | ";
function create_connection()
{
$link = mysql_connect("localhost","root","")
or die("無法連接" . mysql_error());
mysql_query("SET NAMES utf8");
return $link;
}
function execute_sql($database,$sql,$link)