Jump to content
iyeru42

Getting SESSION Data, exec SQL, apply to SESSION

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.)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...