聊天室php&mysql(二)

//第二页面 name="frame2.php"

 1<html>
 2<head>
 3<title>user list</title>
 4<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
 5<meta content="30; url=&lt;? echo $PHP_SELF; ?&gt;?userid=&lt;?echo $userid?&gt;" http-equiv="Refresh"/>
 6</head>
 7<body bgcolor="#6699FF" text="#000000">
 8<div id="Layer1" style="position:absolute; left:9px; top:37px; width:94px; height:21px; z-index:1">
 9<div align="center"><font color="#FF9999"><b>在线人数</b></font></div>
10</div>
11<div id="Layer2" style="position:absolute; left:14px; top:96px; width:105px; height:276px; z-index:2">
12<p><i><font color="#FF9999" size="2">
13<?   
14$sql="select userid,id,sex from chat_user";   
15$result=mysql_query($sql)or die("fallse");   
16while($row=mysql_fetch_array($result)){   
17  
18$user=$row['userid'];   
19$user="<a href='".$PHP_SELF."?userid=".$userid."' onCLick=parent.bottom.user('".$row["id"]."')>".$row["id"];   
20echo $user."(".$row["sex"].")<br/>";   
21}   
22?&gt;   
23  
24</font></i></p>
25<p> </p>
26</div>
27<div id="Layer3" style="position:absolute; left:20px; top:62px; width:74px; height:11px; z-index:3">
28<div align="center"><font color="#FF9999" size="2">(<?echo $online ;?>人)</font></div>
29</div>
30<p> </p>
31<p> </p>
32</body>
33</html>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus