聊天室php&mysql(二)

快乐每一天_801

快乐每一天_801

2016-02-19 09:43

下面图老师小编跟大家分享一个简单易学的聊天室php&mysql(二)教程,get新技能是需要行动的,喜欢的朋友赶紧收藏起来学习下吧!
//第二页面 name="frame2.php"



?
include "../signup/mysql.php";
header("Expires: Sun, 28 Dec 1997 09:32:45 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: text/html; charset=${Charset}");



$current_time=time();
$delete_time=$current_time-40;
$sql="delete from chat_user where last_time".$delete_time;
mysql_query($sql)or die(" false again");



$sql="update chat_user set last_time='$current_time' where userid='$userid'";
mysql_query($sql) or die("false");

$sql="select userid from chat_user";
$result=mysql_query($sql)or die("fallse");
$online=mysql_num_rows($result);
?

html
head
titleuser list/title
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
meta http-equiv="Refresh" content="30; url=? echo $PHP_SELF; ??userid=?echo $userid?"

/head


body bgcolor="#6699FF" text="#000000"
div id="Layer1" style="position:absolute; left:9px; top:37px; width:94px; height:21px; z-index:1"  
  div align="center"font color="#FF9999"b在线人数/b/font/div
/div
div id="Layer2" style="position:absolute; left:14px; top:96px; width:105px; height:276px; z-index:2"  
  pifont size="2" color="#FF9999"

   
  ?            
  $sql="select userid,id,sex from chat_user";
  $result=mysql_query($sql)or die("fallse");
  while($row=mysql_fetch_array($result)){

      $user=$row['userid'];
      $user="a href='".$PHP_SELF."?userid=".$userid."' onCLick=parent.bottom.user('".$row["id"]."')".$row["id"];
      echo $user."/a(".$row["sex"].")br";
  }
  ?

    /font/i/p
  p /p
/div
div id="Layer3" style="position:absolute; left:20px; top:62px; width:74px; height:11px; z-index:3"  
  div align="center"font size="2" color="#FF9999"(?echo $online ;?人)/font/div
/div
p /p
p /p
/body
/html
展开更多 50%)
分享

猜你喜欢

聊天室php&mysql(二)

Web开发
聊天室php&mysql(二)

聊天室php&mysql(二)

PHP
聊天室php&mysql(二)

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

聊天室php&mysql(三)

Web开发
聊天室php&mysql(三)

聊天室php&mysql(一)

Web开发
聊天室php&mysql(一)

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

聊天室php&mysql(五)

Web开发
聊天室php&mysql(五)

聊天室php&mysql(四)

Web开发
聊天室php&mysql(四)

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

BBS(php & mysql)完整版(四)

BBS(php & mysql)完整版(四)

叶子asp分页类

叶子asp分页类
下拉加载更多内容 ↓