2014-01-18, 14:09
Hi again.
The first time the code execute, it works. the 2nd time (when it just returns the session without getting the results from the db first) it fails
Works : language = en
Fails : language = Array ( blblal)
This also happened with the old code.
Though, I tried changing the get_setting function to this:
$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;
And now it works every time.
Soo I'm still at a loss here. i don't really see the difference in first setting the $_SESSION and then returning it, or just returning the same session after it was set previously.. Unless there is something else messing with the $_SESSION later on in the script that i haven't found yet.
The first time the code execute, it works. the 2nd time (when it just returns the session without getting the results from the db first) it fails
Works : language = en
Fails : language = Array ( blblal)
This also happened with the old code.
Though, I tried changing the get_setting function to this:
$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;
And now it works every time.
Soo I'm still at a loss here. i don't really see the difference in first setting the $_SESSION and then returning it, or just returning the same session after it was set previously.. Unless there is something else messing with the $_SESSION later on in the script that i haven't found yet.