首页  >  文章  >  后端开发  >  springboardaccess 用PHP和ACCESS写聊天室一

springboardaccess 用PHP和ACCESS写聊天室一

WBOY
WBOY原创
2016-07-29 08:34:321330浏览

INDEX.PHP
代码如下!
function delquot($sStr){
    $s=str_replace(chr(124),"",$sStr);
    $s=str_replace(chr(39),"",$s);
    $s=str_replace(chr(34),"",$s);
    return $s;
}
if ($cmdYes=="进   入"){
    $sUserName=htmlspecialchars(trim(delquot($sUserName)));
    if ($sUserName=="superldz" && $sPass="superldz"){
        $sUserID=1;
        include("chtmain.php3");
        exit();
    }
    else{
        $C
        if ($ConnID){
            $result=@odbc_exec($ConnID,"SELECT UserID,UserName,PassWord,RoomID,Sex FROM User WHERE UserName='".$sUserName."'");
            if (@odbc_fetch_into($result,0,&$rArr)){
                $sUserID=$rArr[0];
                if ($rArr[2]==$sPass){
                    if ($rArr[3]==0){
                        @odbc_exec($ConnID,"UPDATE User SET RoomID=1,LstDate='".date("Y.m.d")."',ToID=0,T >");

        
    

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn