Ich habe folgende Fehlermeldung wenn ich mein Forum erstellen möchte
Datei
Aber erlich gesagt ich finde kein Fehler in der Reihe
PHP-Code:
Fatal error: Function name must be a string in /users/bboard2/www/forum/klassen/class_session.php on line 57
PHP-Code:
<?php
class session {
var $session_id = 0;
var $session_name = "mysess";
// --- constructor ---
function session() {
}
function board_account() {
global $db;
$session_id = session_id();
$id = $_GET[account_id];
$data = $db->sql_query("select id,benutzername from account where id='$id'");
$_SESSION["account_id"] = $data[0][0];
$_SESSION["account"] = $data[0][1];
}
function user_identity() {
global $db;
$u_identity = rand(0,100000);
$_SESSION["user_identity"] = $u_identity;
}
function startSession() {
global $user,$db, $network,$smarty;
$session_id = session_id();
if ($_POST[form_username]) {
$_SESSION["nickname"] = $_POST[form_username];
$nickname = $_POST[form_username];
$userid = $db->sql_query("Select * from userprofil where
s_user='$_SESSION[account]' AND nickname='$nickname'");
$userid = $userid[0][0];
$_SESSION["userid"] = $userid;
} else {
$accid = $_SESSION["account_id"];
$cn = "1aboard_name_".$accid;
$cpw = "1aboard_pw_".$accid;
$_SESSION["nickname"] = $_COOKIE[$cn];
$nickname = $_COOKIE[$cn];
$userid = $db->sql_query("Select * from userprofil where
s_user='$_SESSION[account]' AND nickname='$nickname'");
$userid = $userid[0][0];
$_SESSION["userid"] = $userid;
};
}
function my_session_unregister() {
$session_unregister('nickname');
$session_unregister('userid');
}
// destroy a session
function destroySession() {
// session_unset();
$this->my_session_unregister();
$file = session_save_path() . "sess_" . session_id();
// @session_destroy();
// @unlink($file);
}
}
?>
Kommentar