Javascript Freichat chat';What’没有显示登录者的姓名?

Javascript Freichat chat';What’没有显示登录者的姓名?,javascript,php,jquery,html,mysql,Javascript,Php,Jquery,Html,Mysql,我已经建立了自己的小型社交网站。最近我添加了一个聊天脚本。现在,当用户登录到我的网站时,我很困惑,我看不到他/她的名字,它将他/她命名为“Guest102”等等 我不明白。请帮忙,我想显示他们的名字,不是客人之类的。。。请帮忙 My loggedin.php代码: Freichat在其php脚本中使用随机函数生成来宾名称 从用户处接收用户名和密码,并在会话中存储用户名, $\会话[“名称”]=$userid 打开服务器目录中的freichat.php,并添加此代码 $custom\u gst\

我已经建立了自己的小型社交网站。最近我添加了一个聊天脚本。现在,当用户登录到我的网站时,我很困惑,我看不到他/她的名字,它将他/她命名为“Guest102”等等

我不明白。请帮忙,我想显示他们的名字,不是客人之类的。。。请帮忙

My loggedin.php代码:



Freichat在其php脚本中使用随机函数生成来宾名称

  • 从用户处接收用户名和密码,并在会话中存储用户名, $\会话[“名称”]=$userid

  • 打开服务器目录中的freichat.php,并添加此代码

  • $custom\u gst\u name=$\u会话['name']//会话中的用户名,注释上一次分配

    将显示用户输入的登录ID,而不是guest

    转到freichat/hadcore.php 编辑以下内容以适合您的数据库以及表和表列, /*自定义驱动程序*/

    $usertable='user'//指定存储用户信息的表的名称

    $row_username='name'//指定存储用户名/显示名的字段的名称

    $row_userid='id'//指定存储用户id的字段的名称(通常为id或userid)

    安装时请记住使用自定义配置

    <!-- if you need user information, just put them into the $_SESSION variable and output them here -->
    <!DOCTYPE html>
    <html>
    <head>
        <!--===========================FreiChat=======START=========================-->
        <!--    For uninstalling ME , first remove/comment all FreiChat related code i.e below code
             Then remove FreiChat tables frei_session & frei_chat if necessary
                 The best/recommended way is using the module for installation                         -->
    
        <?php
        $ses=null;
    
        if(!function_exists("freichatx_get_hash")){
            function freichatx_get_hash($ses){
    
                if(is_file("C:/Users/Raj/PhpstormProjects/socialnetworking1/chat system/hardcode.php")){
    
                    require "C:/Users/Raj/PhpstormProjects/socialnetworking1/chat system/hardcode.php";
    
                    $temp_id =  $ses . $uid;
    
                    return md5($temp_id);
    
                }
                else
                {
                    echo "<script>alert('module freichatx says: hardcode.php file not
    found!');</script>";
                }
    
                return 0;
            }
        }
        ?>
        <script type="text/javascript" language="javascipt" src="http://localhost:63342/socialnetworking1/chat system/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>
        <link rel="stylesheet" href="http://localhost:63342/socialnetworking1/chat system/client/jquery/freichat_themes/freichatcss.php" type="text/css">
        <!--===========================FreiChatX=======END=========================-->
        <title>Maiit kota-rajasthan</title>
    </head>
    <style>
        body{
            background-color: #D0D0D0;
        }
    
        #menu_header{
            position: fixed;
            top: 0%;
            left: 0%;
            right: 0%;
            height: 5%;
            background-color: black;
        }
    
        #right_box{
            position: fixed;
            width: 20%;
            right: 0%;
            top: 6%;
            height: 93%;
            background-color: white;
            font-family: "Segoe UI Light";
            -webkit-box-shadow: 0px 1px 30px 0px rgba(50, 50, 50, 0.33);
            -moz-box-shadow:    0px 1px 30px 0px rgba(50, 50, 50, 0.33);
            box-shadow:         0px 1px 30px 0px rgba(50, 50, 50, 0.33);
            -webkit-border-radius: 3px;
            -moz-border-radius: 3px;
            border-radius: 3px;
        }
    
    </style>
    <body>
    <div id="menu_header">
    
    </div>
    <div id="right_box">
    <p style="text-align: center;">Today's Top faces</p><hr>
        <a href="index.php?logout">Logout</a>
    </div>
    </body>
    </html>
    
    Hey, <?php echo $_SESSION['name'] ?>. You are logged in.
    Try to close this browser tab and open it again. Still logged in! ;)
    
    <!-- because people were asking: "index.php?logout" is just my simplified form of "index.php?logout=true" -->
    <a href="index.php?logout">Logout</a>