I am using a chat java applet that i incorporated into a template. I have a 2nd template with an error message that its for registered members only. I've been trying different things but so far it either works for all (regd and unregd) or neither. Not sure what I'm doing wrong. The code in my member.php is:
PHP Code:
// Chat
if ($action=="chat") {
if ($bbuserinfo['userid'] == "0") {
$templatesused = 'chat_error';
include("./global.php");
eval("dooutput(\"".gettemplate("chat_error")."\");");
} else {
$templatesused = 'chat_load';
include("./global.php");
eval("dooutput(\"".gettemplate("chat_load")."\");");
}
}
And I use the action=chat to call this stuff. But like I said, i get either the chat window, or the error message for both, while it should be error -> unregd, chat -> regd
Thx in advance