View Single Post
  #3  
Old 6th November 2012, 15:07
hEDge's Avatar
hEDge hEDge is offline
Member
 
Join Date: Oct 2012
Latvia
Posts: 10
Default
btw i need help on this one
PHP Code:
function if ($user->user) {
        
//Update online user list
        
$pagename substr($_SERVER["PHP_SELF"],strrpos($_SERVER["PHP_SELF"],"/")+1);
        
$sqlupdate "UPDATE ".$db_prefix."_online_users SET page = '".addslashes($pagename)."', last_action = NOW() WHERE id = ".$user->id.";";
        
$sqlinsert "INSERT INTO ".$db_prefix."_online_users VALUES ('".$user->id."','".addslashes($pagename)."', NOW(), NOW())";
        
$res $db->sql_query($sqlupdate);
        if (!
$db->sql_affectedrows($res)) $db->sql_query($sqlinsert);

returns errors

Warning: strrpos() expects parameter 1 to be string, array given in /opt/lampp/htdocs//themes/pmbt/main.php on line 163

Warning: substr() expects parameter 1 to be string, array given in /opt/lampp/htdocs//themes/pmbt/main.php on line 163

not shure hove to fix this thing
and yes thanks for that function abowe
__________________
Ask me not as i don't know the answer !
Reply With Quote