脚本宝典收集整理的这篇文章主要介绍了聊天室php&mysql(一),脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
//第
一个页面&nbs
p; n
ame="index1.
PHP"
<?
include "
../signup/
MysqL.
PHP";
$time1=time();
//$userid=9835
30409;
echo $n;
if($n
==1){
$userid=time();
$nick="g".$userid;
$last_time=$userid;
$
sql="insert into c
hat_user (userid,id,last_time) values ('$userid','$nick','$last_time')";
MysqL_query($
sql)or
die(
MysqL_error());
$
sql="insert into chat_user_list (userid,'$last_time')";
MysqL_query($
sql)or die(
MysqL_error());
echo"<FONT SIZE=6 COLOR=
#FF0066><B>LOADING ........</B></FONT>";
echo "<script language='JavaScript'> window.o
PEn('index1.
PHP?userid=".$userid."','chat','toolbar=no,directories=no,men
ubar=no,width=800,h
eight=570,left=0,top=0,
status=0');";
echo" window.close() </script>";
}
if($n==983530409)
{
$
sql="select userid,sex,
passwd From user where id='$n'";
$result=
MysqL_query($
sql);
$row=
MysqL_fetch_array($result);
$nick=$row["userid"];
$passwd=$row["passwd"];
$sex=$row["sex"];
$
sql="insert into chat_user (userid,passwd,last_time,id)values('$n','$passwd','$sex','$time1','$nick')";
MysqL_query($
sql)or die(
MysqL_error());
echo"<FONT SIZE=6 COLOR=#FF0066><B>LOADING ........</B></FONT>";
echo "<script language='JavaScript'> window.open('index1.
PHP?userid=".$n."',status=0');";
echo" window.close(); </script>";
}
?>
<ht
ML>
<head>
<t
ITle>
::: FEIT聊
天室 :::</title>
<
Meta http-equiv="Content
-type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="
netscape")&&(parseInt(ap
pversion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<frameset cols="*,132" frameborder="NO" border="0" framespacing="0" rows="*">
<frameset rows="*,111" frameborder="NO" border="0" framespacing="0" cols="*">
<frame name="top" src="index.
PHP?userid=<? echo $userid?>" scrolling="AUTO">
<frame name="bottom" scrolling="NO" noresize src="frame3.
PHP?userid=<? echo $userid ?>">
</frameset>
<frameset rows="*,110" frameborder="NO" border="0" framespacing="0">
<frame name="right" scrolling="AUTO" noresize src="frame2.
PHP?userid=<? echo $userid?>">
<frame name="bottomFrame" scrolling="NO" noresize src="frame4.
PHP">
</frameset>
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
<p>很抱歉!这是
一个分帧
页面,但由于你的浏览器
不支持,所以不能浏览! </p>
<p>Sorry!This page uses frames,but your
browser doesn't support them .</p>
</body>
</noframes>
</html>
脚本宝典总结
以上是脚本宝典为你收集整理的聊天室php&mysql(一)全部内容,希望文章能够帮你解决聊天室php&mysql(一)所遇到的问题。
如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。