【php开源代码栏目提醒】:网学会员在php开源代码频道为大家收集整理了code7.22.php提供大家参考,希望对大家有所帮助!
<?php
$link=mysql_connect("localhost","root","0");
if(!$link)
{
echo "数据库连接失败";
}
mysql_select_db("db_student");
$
sqlText="select * from student";
$result =
mysql_query($sqlText);
while ($row = mysql_fetch_assoc($result))
{
echo "编号:".$row['ID']."...:".$row['name']."...性别:".$row['sex0']."...年龄:".$row['age']."<br/>";
}
?>