<!DOCTYPE HTML><html><head> <meta charset="utf-8" /> <title>Music</title> <link rel="stylesheet" href="singer.css" type="text/CSS" /> </head><body> <div id="header"> <div id="aa"> <div id="a1"> <img src="images/3.jpg" id="a2"> <h1>Music</h1> </div> <ul id="dh1"> <li><a href="#" id="music">音乐馆</a></li> <li><a href="#" id="mymusic">我的音乐</a></li> <li><a href="#" id="vip">VIP</a></li> </ul> <div id="a3"> <input name="sousou" type="text"> </div> <div id="a4"> <a href="login.php" id="login">登录or注册</a> </div> </div> <div id="xhx"></div> <ul id="dh2"> <li><a href="index1.php" id="shouye">首页</a></li> <li><a href="singer.php" id="singer">歌手</a></li> <li><a href="cd.php" id="zhuanji">专辑</a></li> <li><a href="rock.php" id="zhuanji">摇滚</a></li> <li><a href="hip-hop.php" id="zhuanji">嘻哈</a></li> <li><a href="pop.php" id="zhuanji">流行</a></li> <li><a href="qing.php" id="zhuanji">轻音乐</a></li> </ul> </div> <div id="content"> <?php require_once('conn.php'); $sql = "select * from singer where SgID='1'"; $query = mysql_query($sql); if($query&&mysql_num_rows($query)){ while($row = mysql_fetch_assoc($query)){ $data[] = $row; } }?> <?php if(empty($data)){ echo "!!!!无!!!!"; }else{ foreach($data as $value){?> <div id="main1"> <div id="s"> <a href="mayday.php?id=<?php echo $value['SgID']?>"> <img src="<?php echo $value['SgImg']?>"></a> </div> <div id="s1"> <a href="mayday.php"><p id="h1"><?php echo $value['SgName']?></p></a> </div> </div> <?php } }?> </div> </body> </html>
- 2 回答
- 0 关注
- 2224 浏览
添加回答
举报
0/150
提交
取消