Jump to content

Getting SESSION Data, exec SQL, apply to SESSION


iyeru42

Recommended Posts

I'm having a problem with this, well... sort of.

		$usergroup_sql   = mysql_query("SELECT * FROM `usergroups` WHERE `id`='".$_SESSION['usergroup']."'");		$userg_sql_array = mysql_fetch_assoc($usergroup_sql);	$_SESSION['permissions']['cmakethreads'] = $userg_sql_array['cmakethreads'];

In a blank PHP Document (manually defining $_SESSION['usergroup']), this works fine, but when I put it into my message board... Everything in $usergroup_sql is blank when its line executes. Note $_SESSION['usergroup'] DOES exist and is set to a number (meaning a session IS set) when I'm browsing around. (I echo'd it to make sure.)No, no MySQL Errors nor PHP Errors within the apache/mysql logs. I need to take that session variable though. There is no other way to read the current userid that I am logged in as.Anyway, you guys can download it from this folder (they're 7z files) and see what you make of it. Note, the setup and skin folders should be ignored. Most of those things have already been fixed.loadConfigs.php in the includes folder is where this all is being setup (check init.inc.php too, since it requires loadConfigs in a function.)You can also set up the board as well (but you need to delete dbinfo.inc.php), there shouldn't be any issues during setup. (Make sure that after you do the install.php you don't go back to it, it won't allow you to use it again as long as dbinfo.inc.php exists.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...