The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Header problem...

I have a website and everything seems to work fine, except one small thing.
I have a login form where user login. After submitting that form they'll be taken to a separate page, which is checking their details and they end up in different pages whether they have a level 1 or level 2 in their row.

I also set the number of times they've been logged in here as well.

But when it passes this page and move on, they end up in their specific page (let's say, either 1 or 2).
On this new page I have a table with 2 columns.
In the left column I have text parts and in the right column I have an include with things that is used all over the site (like visitors online, total members, and so on).

But when I pass the login check page with the redirection part the stuff in the right column isn't showing. I only get "Failed!" in that area.
Everything else on the page is loaded like it should and if I reload the page I can see the right column correct.

Sorry, was a bit confused when I tried to explain what the page does, since I'm working on like 10 pages at the time.
The page I'm talkig about is checking if the users status is set to 1 or not (if they have been activated).

It's also setting a couple of Session stuff to be used later on following pages.

But here is the code that is corrupted.
(oh, by the way, the ++ thing is working. So I don't need to change that.)

// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}