<!-- 程式範例-->
<html>
<head><title>查詢資料表的記錄資料</title></head>
<body>
<table border=1>
<?
$link = mysqli_connect("localhost","10179524",
"10179524","10179524");
$sql = "SELECT * FROM jqm_products";
if ( $result = mysqli_query($link, $sql) ) {
while( $row = mysqli_fetch_assoc($result) ){
echo "<td>".$row["name"]."</td>". "<td>".$row["price"]."</td>"."<tr>";
}
mysqli_free_result($result);
}
mysqli_close($link);
?>
</table>
</body>
</html>