初学php,不知道怎么样读取数据库数据,帮忙! 数据库localhost,用户名root,密码为空 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?php$mylink=mysql_connect("localhost","root","1234");$sql="SELECT id,name from 表名";$result_output=mysql_query($sql,$mylink);if(mysql_num_rows($result_output)>0){?><table width="75%" border="1"><?php while($array_yh=mysql_fetch_array($result_output)){?> <tr> <td><?php echo $array_yh['id'];?></td> <td><?php echo $array_yh['name'];?></td> </tr><?php }?></table><?php}?> 建议初学者把php和mysql手册先看了再说 php盲问个白痴问题 Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] 菜鸟求打击 截取网址的疑问 写累了个很简单的购物车,但是checkbox value出问题了,求帮助。 如何实现提交多条数据 高分求解,导入文本文件问题!在先等待! session问题 正则表达式 100分问,输入HTML原代码,SAVE数据库MYSQL,输出要显示IE解释后的图形出来!!着急,在线给分 PHP菜菜求助 session和cookie
$mylink=mysql_connect("localhost","root","1234");
$sql="SELECT id,name from 表名";
$result_output=mysql_query($sql,$mylink);
if(mysql_num_rows($result_output)>0){
?>
<table width="75%" border="1">
<?php
while($array_yh=mysql_fetch_array($result_output)){
?>
<tr>
<td><?php echo $array_yh['id'];?></td>
<td><?php echo $array_yh['name'];?></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>