$_SESSION Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Crew
Forum Newbie
Posts: 16
Joined: Fri Jul 15, 2005 4:05 am

$_SESSION Problem

Post by Crew »

Hi all,

My first post and hopefully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?n help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another lude on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the pags with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when ith user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changt post and hopefully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossiblt post and hopefully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?ertain areas.

Can anyone help?clude on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from o protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level&ame, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?ho $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheckї&quote;level&quote;];
echo $level;
?&gt;

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. I' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?pefully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?ername'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheckї&quote;level&quote;];
echo $level;
?&gt;

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain are$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level&quote;];
echo $level;
?&gt;

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another oysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?t post and hopefully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impos$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossiblmp;amp;lt;?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?e can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visiname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apaSSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at velcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user right='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyonant to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?fully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?lcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apt post and hopefully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It m_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheckї&quote;level&quote;]ped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help18286]<?php
echo $_SESSION['username'];
$uname = $_SESSIONї'username'];
$levelcheck = mysql_query(&quote;SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1&quote;);
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheckї&quote;level&quote;];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?t post and hopefully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happenamp;lt;?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheckї&quote;level&quote;];
echo $level;
?&gt;

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areg code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help? mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?4e118286]<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?t post and hopefully someone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certae an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck[eone can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?l = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but wh

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the data user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?can help me, I'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to t]<?php
echo $_SESSIONї'username'];
$uname = $_SESSIONї'username'];
$levelcheck = mysql_query(&quote;SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1&quote;);
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheckї&quote;level&quote;];
echo $level;
?&gt;

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to anothpages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?heck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?&hts with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to cert118286]<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query(&quote;SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1&quote;);
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheckї&quote;level&quote;];
echo $level;
?&gt;

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESith user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck[&quotI'm stumped!

I have an include on pages I want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again want to protect with user level rights with the following code

Code: Select all

<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>
The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happ<?php
echo $_SESSION['username'];
$uname = $_SESSION['username'];
$levelcheck = mysql_query("SELECT level FROM helpdesk_users WHERE username='$uname' LIMIT 1");
$levelcheck = mysql_fetch_array($levelcheck);
$level = $levelcheck["level"];
echo $level;
?>

The problem is, the first time I visit the page the SESSION username is correct but when I visit the page again the username has changed to another one in the database??? How has this happened I have no other writes to the SESSION variable apart from at login. It makes it impossible to check user rights to certain areas.

Can anyone help?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

you need to call http://www.php.net/session_start before you access the $_SESSION array...
Crew
Forum Newbie
Posts: 16
Joined: Fri Jul 15, 2005 4:05 am

Post by Crew »

Thats actually started sorry :(
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Prepend the following to your scripts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
1930fb7da8]
ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fE_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
30fb7da8]

And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
, TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
ing to your scripts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_arraying to your scripts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
lay_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
a8]
ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
1930fb7da8]
$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
cripts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
$rs);
if (!$row) print mysql_error();
ing to your scripts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
1]
ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_arrayssages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
p]
ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
da8]
$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
'display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
ipts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
ing to your scripts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_fb7da8]
$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
t('error_reporting', E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
[/phpeturn messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
ing to your scripts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
[/php:1:193ges:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
eck if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
t return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
ing to your scripts:

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_rting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
sql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if RUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
1]
ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
sn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array(
ini_set('display_errors', TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
1930fb7da8]

And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query, TRUE);
And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
eporting', E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);


And check if mysql doesn't return messages:

Code: Select all

$rs = mysql_query($sql) or print mysql_error();
$row = mysql_fetch_array($rs);
if (!$row) print mysql_error();
Crew
Forum Newbie
Posts: 16
Joined: Fri Jul 15, 2005 4:05 am

Post by Crew »

Rather strange but from testing it appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very oddhe global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name&quote;);
					$level=mysql_result($result,$i,&quote;level&quote;);
					$username=mysql_result($result,$i,&quote;username&quote;);
					$email=mysql_result($result,$i,rwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id&quote;);
					$name=mysql_result($result,$i,&quote;name&quote;);
					$level=mysql_result($result,$i,&quote;level&quote;);
					$username=mysql_result($result,$i,"username"); ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,&quote;				$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very odd from testing it appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i &lt; $num) {
					
					$id=mysql_result($result,$i,&quote;id&quote;);
					$name=mysql_result($result,$i,&quote;name&quote;);
					$level=mysql_result($result,$i,&quote;level&quote;);
					$username=mysql_result($result,$i,&quote;username&quote;);
					$email=mysql_result($result,$i,&quote;email&quote;);
					$location=mysql_result($result,$i,&quote;location&quote;);
					$tel=mysql_result($result,$ from testing it appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very oddte;tel");

Very odderwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very odde4105783b1] $i=0;
while ($i < $num) {

$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,&quote;name&quote;);
$level=mysql_result($result,$i,&quote;level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"el session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very odd"id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,&quote;email&quote;);
$location=mysql_result($result,$i,&quote;location&quote;);
$tel=my $username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odd it appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very oddi,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username&quote;);
$email=mysql_result($result,$i,&quote;email&quote;);
$location=mysql_result($result,$i,&quote;location&quote;);
$tel=mysql_result($result,$i,&quote;tel&quote;);[/php:1:$result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very oddd");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"eme;);
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odd=mysql_result($result,$i,"tel");

Very odd from testing it appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very odd $email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odd the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very oddat the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"emaiame=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very oddote;id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,&quote;location&quote;);
sql_result($result,$i,"email");
$location=mysql_result($result,$i,"location&quote;);
$tel=mysql_result($result,$i,&quote;tel&quote;);

Very odd);
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very oddhp] $i=0;
while ($i < $num) {

$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very oddt appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very oddlt,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel&quote;);

Very odd from testing it appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i &lt; $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name&quote;);
					$level=mysql_result($result,$i,&quote;level&quote;);
					$username=mysql_result($result,$i,&quote;username&quote;);
					$email=mysql_result($result,$i,&quote;email&quote;);
					$location=mysql_result($result,$i,&quote;location&quote;);
					$tel=mysql;quote;id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_resulariable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,&quote;id&quote;);
					$name=mysql_result($result,$i,&quote;name&quote;);
					$level=mysql_result($result,$i,&quote;level&quote;);
					$username=mysql_result($result,$i,&quote;username&quote;);
					$email=mysql_result($result,$i,&quote;email&quote;);
					$location=mysql_result($result,$i,&quote;location&quote;);
					$tel=mysql_result($result,$i,&quote;tel&quote;);
Very odd=mysql_result($result,$i,"id&quote;);
$name=mysql_result($result,$i,&quote;name&quote;);
$level=mysql_result($result,$i,&quote;level&quote;);
$username=mysql_result($result,$i,&quote;username&quote;);
$email=mysql_result($result,$i,&quote;email&quote;);
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odd from testing it appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$locatiult($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very oddnum) {

$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,&quote;username&quote;);
$email=mysql_result($result,$i,&quote;email&quote;);
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very oddt,$i,"tel");

Very oddmp;quote;username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odd $id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odd from testing it appears that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");[/eing overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($res that the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very oddmail=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel&quo
$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,&quote;level&quote;);
$username=mysql_result($result,$i,&quote;username&quote;);
$email=mysql_result($result,$i,&quote;emai $i=0;
while ($i < $num) {

$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odd the global session variable was being overwritten by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very odd $id=mysql_result($result,$i,&quote;id&quote;);
$name=mysql_result($result,$i,"name&quote;);
$level=mysql_result($result,$i,&quote;level&quote;);
$username=mysql_result($result,$i,&quote;username&quote;);
$email=mysql_result($result, by

Code: Select all

$i=0;
				while ($i < $num) {
					
					$id=mysql_result($result,$i,"id");
					$name=mysql_result($result,$i,"name");
					$level=mysql_result($result,$i,"level");
					$username=mysql_result($result,$i,"username");
					$email=mysql_result($result,$i,"email");
					$location=mysql_result($result,$i,"location");
					$tel=mysql_result($result,$i,"tel");
Very odde;);
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odde=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$locatiole ($i < $num) {

$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very oddid=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name&quote;);
$level=mysql_result($result,$i,&quote;level&quote;);
$username=mysql_result($result,$i,&quote;username&quote;);
$email=mysql_result($result,$i,&quote;email&quote;);
$location=mysql_result($result,$i,&quote;location&quote;);
$tel=mysql_result($result,$i,&quote;tel&quote;);

Very oddphp] $i=0;
while ($i < $num) {

$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,&quote;name&quote;);
$level=mysql_result($result,$i,&quote;level&quote;);
$username=mysql_result($result,$i,&quote;username&quote;);
$email=mysql_result($result,$i,&quote;email&quote;);
$location=mysql_result($result,$i,&quot $i=0;
while ($i < $num) {

$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$level=mysql_result($result,$i,"level");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
$location=mysql_result($result,$i,"location");
$tel=mysql_result($result,$i,"tel");

Very odd
Post Reply