首页 编程教程正文

聊天室php&mysql(五)

piaodoo 编程教程 2020-02-02 13:47:47 1050 0 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:82px; top:139px; width:58px; height:20px; z-index:5">性别</div>
</body>
</html>

版权声明:

本站所有资源均为站长或网友整理自互联网或站长购买自互联网,站长无法分辨资源版权出自何处,所以不承担任何版权以及其他问题带来的法律责任,如有侵权或者其他问题请联系站长删除!站长QQ754403226 谢谢。

有关影视版权:本站只供百度云网盘资源,版权均属于影片公司所有,请在下载后24小时删除,切勿用于商业用途。本站所有资源信息均从互联网搜索而来,本站不对显示的内容承担责任,如您认为本站页面信息侵犯了您的权益,请附上版权证明邮件告知【754403226@qq.com】,在收到邮件后72小时内删除。本文链接:https://www.piaodoo.com/3464.html

搜索