Not sure if i understand you correctly.....
And it's not an error og but simply for me to check if it doesn't send post when not needed. I use it al the time when coding to be sure that things actually happen and i can see it in the logs.
What you see now is that a post is not send cause there's no value in the queryusername therefor a post is not needed an should not be send.
You can remove the console.log lines.
In the copy-paste file there's this piece of code for ajaxchat.php that has to do with setting a simple cookie for the username:
In AJAXChat.php look for:
if(!$this->getRequestVar('ajax') && !headers_sent()) {
// Set style cookie:
$this->setStyle();
// Set langCode cookie:
$this->setLangCodeCookie();
}
and replace with this code:
if(!$this->getRequestVar('ajax') && !headers_sent()) {
// Set style cookie:
$this->setStyle();
// Set langCode cookie:
$this->setLangCodeCookie();
$this->setUserNameCookie(); // ID:typeMod
}
also in AJAXChat look for:
function setLangCodeCookie() {
setcookie(
$this->getConfig('sessionName').'_lang',
$this->getLangCode(),
time()+60*60*24*$this->getConfig('sessionCookieLifeTime'),
$this->getConfig('sessionCookiePath'),
$this->getConfig('sessionCookieDomain'),
$this->getConfig('sessionCookieSecure')
);
}
and put this code directly underneath:
//your userName written to cookie ID:typeMod
function setUserNameCookie() {
setcookie(
$this->getConfig('sessionName').'_yourname',
$this->getRequestVar('userName'),
time()+60*60*24*$this->getConfig('sessionCookieLifeTime'),
$this->getConfig('sessionCookiePath'),
$this->getConfig('sessionCookieDomain'),
$this->getConfig('sessionCookieSecure')
);
}