当前位置:数据库 > SQLServer >>

聊天室php&mysql(三)

第三个页面 name="frame3.php(做为现在的主流开发语言)"


<?
include "../signup/MySQL(和PHP搭配之最佳组合).php(做为现在的主流开发语言)";
//echo $userid;
//echo $private;
if($p)$p=1;
else $p=0;

if(($action="ok")and($p)){

$sql="select userid,id from chat_user_list where userid=$userid";
$result=MySQL(和PHP搭配之最佳组合)_query($sql);
$roww=MySQL(和PHP搭配之最佳组合)_fetch_array($result);
$userrr=$roww["id"];





$sql="select userid,id from chat_user_list where id=$object";
$result=MySQL(和PHP搭配之最佳组合)_query($sql);
if($row1=MySQL(和PHP搭配之最佳组合)_fetch_array($result))
$object=$row1["userid"];
else {
    $object="大家";
    $k=1;}      

$select="select row from user_message order by row DESC";
        $result=MySQL(和PHP搭配之最佳组合)_query($select)or die(" false fgfg");
        $rowlist=MySQL(和PHP搭配之最佳组合)_fetch_array($result)or die("false fgs");
        $max_row=$rowlist["row"];

$row=$max_row+1;
$time1=date("G:i");


$sql="INSERT INTO user_message (userid,object,message,status,action1,color,row,time1) values($userid,$object,$message,$private,$action1,$color,$row,$time1)";

MySQL(和PHP搭配之最佳组合)_query($sql)or die(MySQL(和PHP搭配之最佳组合)_error());

if($k){$object="大家"; $private=0;}
else
$object=$row1["id"];
}

?>
<html>
<head>
<title>input table</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


<SCRIPT LANGUAGE="JavaScript">
<!--
function user(user){

document.form1.object.value=user;
}

function changnick(){
window.open("changnick.php(做为现在的主流开发语言)?userid=<?echo $userid ;?>","changnick","易做图=no,directories=no,menubar=no,width=800,height=570,width=340,height=220,status=0");
}

//-->
</SCRIPT>

</head>

<body bgcolor="#6699FF" text="#000000">

<div id="Layer1" style="position:absolute; left:125px; top:4px; width:498px; height:79px; z-index:1">  
  <form name="form1" method="post" align="center" action="<? echo $php(做为现在的主流开发语言)_SELF; ?>?action=ok">
    <p> <font color="#6699ff">.</font>  
      <input type="text" name="object" size="10" value="<?echo $object?>">
      <input type="hidden" name="userid" value="<?echo $userid ?>">
      说  
      <input type="hidden" name="p" value="1">
      <input type="text" name="message" size="30">
      <input type="submit" name="ok" value="发送">
    </p>
    <p> <font color="#6699FF">.</font>  
      <select name="action1">
        <option selected value="说">说话</option>
        <option value="悄悄地">悄悄</option>
        <option value="兴高采烈地">高兴 </option>
补充:Web开发 , php ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,