|
错误:Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test.php3 on line 4,
mysql可用,直接用php解析可以显示,数据表格
<html>
<body>
<?php
$db=mysql_connect("a104","root","971098");
mysql_select_db("test",$db);
$result=mysql_query("SELECT * FROM teacher",$db);
echo "hello\n";
echo "<table border=1>\n";
echo "<tr><td>id</td><td>name</td><td>address</td><td>year</td></tr>";
while($myrow=mysql_fetch_row($result)){
printf("<tr><td>%dtd><td>%s</td><td>%s</td><td>%s</td></tr>\n",$myrow[1],$myrow[2],$myrow[3],$myrow[4]);
}
echo "</table>\n";
?>
this is the end of the page!
</body>
</html>[img][/img][img][/img][img][/img][img][/img] |
|