MovieLib - Your movie database on web
#79
Try in function.php replace:

Code:
function get_settings($mysql_ml, $mysql_tables) {
    
    // if settings in session not exists get it from database
    if (!isset($_SESSION['site_name'])) {
        $set_sql = 'SELECT * FROM ' . $mysql_tables[1];
        $set_result = mysql_query($set_sql);
        while ($set = mysql_fetch_assoc($set_result)) {
            foreach($set as $key => $val) {
                $_SESSION[$key] = $val;
            }
        }
    }
    
    // settings from session to var
    $output_set = array();
    foreach ($_SESSION as $key => $val) {
        $output_set[$key] = $val;
    }
    return $output_set;
}

to:

Code:
function get_settings($mysql_ml, $mysql_tables) {
    
    // if settings in session not exists get it from database
    if (count($_SESSION) < 10) {
        $set_sql = 'SELECT * FROM ' . $mysql_tables[1];
        $set_result = mysql_query($set_sql);
        $get_set = mysql_fetch_assoc($set_result);
        $_SESSION = $get_set;
    }
    return $_SESSION;
}

Clear the session before.
Reply
 
Thread Rating:
  • 8 Vote(s) - 4.63 Average


Messages In This Thread
RE: MovieLib - Your movie database on web - by Regss - 2014-01-18, 12:56
Last Post - by Jeffreywat - 2017-09-03, 14:02


Logout Mark Read Team Forum Stats Members Help
MovieLib - Your movie database on web4.638