聊天室php&mysql(五)

2016-01-29 14:32 2 1 收藏

聊天室php&mysql(五),聊天室php&mysql(五)

【 tulaoshi.com - PHP 】

  第五个页面name="changenick.php"


<?   
include "../signup/mysql.php";
//echo $userid;
if($action=="ok")
{
$sql="select * from chat_user_list where userid='$nick'";
$result=mysql_query($sql) or die(mysql_error());
if(!$result) echo "该呢称已被他人占用 请重新填写";
else   
    {
$sql="update chat_user_list set id='$nick',passwd='$passwd',sex='$sex' where userid='$userid'";
$result=mysql_query($sql)or die(mysql_error());

$sql="update chat_user set id='$nick',passwd='$passwd',sex='$sex' where userid='$userid'";
$result=mysql_query($sql)or die(mysql_error());
     }
if($result){
           echo "<script language='JavaScript' window.close() </script";
           }

}


?

<html
<head
<title:::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(appVersion)==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

<body bgcolor="#ffffff" text="#000000"

<div id="Layer1" style="position:absolute; left:40px; top:28px; width:293px; height:202px; z-index:1; background-color: #6699FF; layer-background-color: #6699FF; border: 1px none #000000"</div
<div id="Layer2" style="position:absolute; left:144px; top:54px; width:126px; height:70px; z-index:2"  
  <form name="form1" method="post" action="<?echo $PHP_SELF??action=ok"
    <p  
      <input type="text" name="nick" size="12" maxlength="20"
    </p
    <p  
      <input type="text" name="passwd" size="12" maxlength="20"
      <input type="hidden" name="userid" value="<?echo $userid ;?"
    </p
    <p  
      <select name="sex"
        <option value="帅哥"帅哥</option
        <option value="妹妹"美眉</option
      </select
    </p
    <p
      <input type="submit" name="ok" value="更改" align="center"
    </p
  </form
</div
<div id="Layer3" style="position:absolute; left:72px; top:58px; width:72px; height:20px; z-index:3"用户呢称</div
<div id="Layer4" style="position:absolute; left:72px; top:99px; width:71px; height:23px; z-index:4"用户密码</div
<div id="Layer5" style="position:absolute; left:82p

来源:https://www.tulaoshi.com/n/20160129/1493578.html

延伸阅读
标签: PHP
  第四个页面 name="index.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}&quo...
标签: PHP
  function post2() {     global $sid,$aid,$PHP_SELF;     global $banner,$body,$poster,$email,$type,$CHAR_GB;                 if(strlen($banner)==0 || strlen($body)==0 || strlen($poster)==0 || strlen($e...
标签: PHP
  大家好!好久没有看到大家了,上次写了用PHP的通过文件操作的聊天室,当然是漏洞百出的,而且每一次刷新屏幕都很糟糕的!我想了好久,是不是能有一种方法不要刷新,就能取得发言的信息了?多用一个框架就能实现这个效果了,即多用一个框架我们称为getmsg,我们让getmeg去取得信息而且保证每一次取得的信息是最新的,就是上次取得的发言...
标签: PHP
  function cook_cooloff(){     global $PHP_SELF,$aid,$pgno;     setcookie("OPEN_LIST",0,time()+ 31536000);     Header("Location:$PHP_SELF?aid=$aid&pgno=$pgno");     exit; } //=============================...
标签: PHP
  echo "<br";     echo "<TABLE width=85% border=0 cellPadding=0 cellSpacing=1 align=center bgcolor='#6CA6CD'";       echo "<tr<td";       echo "<TABLE width=100% cellPadding=1 cellS...

经验教程

991

收藏

72
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部