IE PHP session help

as4s1n

New Member
Messages
174
Reaction score
4
Points
0
For some reason, when people would go to their profile page in IE, it has the error message I have that reads: You do not have permission to view this page (The error would be in case the person wanted to hide their profile page) however regardless of hidden or not it still says that. I do not know whether it is the $_SESSION superglobal (which it probably isn't considering up at the top it shows the current user who is logged in) or something with IE

Here is the PHP:
PHP:
#Get all the variables

$userID = $_REQUEST['id'];

#Find the user

$q = "SELECT username FROM users WHERE id = '$userID'";

$r = mysql_query($q) or die("There was an error with the query.");

if(mysql_num_rows($r) === 0)

 echo "User not found\n";

else {

 while($row=mysql_fetch_array($r, MYSQL_ASSOC)) {

  $name = $row['username'];

  $curUser = $_SESSION['loggedin'];

  if($name != $curUser)

      echo "You do not have permission to view this page";

  else {
Currently, I am just allowing the user who's page it is to view their profile.
 
Top