[PHP] 纯文本查看 复制代码
<html>
<head>
<meta http-equiv="Content-Type" content="text/html"; charset=utf-8">
</head>
<body>
<?php
$link = mysql_connect("localhost", "root", "mypassword") or die ("Can not connect to server<br><br>" . mysql_error());
$db_selected = mysql_select_db("pw87") or die ("Can not select pw87<br>" . mysql_error());
$sql = "select username, email from pw_members";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
echo $row['username']. ' ' . $row['email'];
echo "<br />";
}
mysql_close($link);
?>
</body>
</html>