- Code: Select all
<?php
session_start();
/*--------------------- chat --------------------------*/
$params = array();
if (isset($_SESSION['login']))
{
$params['dyn_params'] = array('frozen_nick');
$params["frozen_nick"] = true;
$params["nick"] = $_SESSION['login'];
}
else
{
$params["nick"] = "Guest".rand(1,100);
}
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__);
$chat = new phpFreeChat( $params );
/* ----------------- end chat --------------------------*/
?>
this cod works, but i have one problem. - the first time that it is impossible to send messages.
before logging

after logging

after the update page

how to solve this problem?