abdulazeez alugo wrote:

Hi,
Well I'ld say the reason is quite obvious. You have simply not set $_session["username"] . I'ld have done something like: -- option.php --
<?php
 session_start();
 if ($_POST["option"] == "View Pending Requests")
{
$_session["username"]= true;  //sets the session
header('Location: http://intra.mdah.state.ms.us/helpdesk/viewpending.php?PHPSESSID='.SID); // <http://intra.mdah.state.ms.us/helpdesk/viewpending.php?PHPSESSID=%27.SID%29;%A0%A0%A0+//> I'ld use SID
 }
 ?>

--viewpending.php -
 <?php
 session_start();
 if ($_SESSION["username"] !=true)
 {
 echo "You have not logged in";
 exit;
 }
 ?>
I hope this helps. try it.
Cheers
Alugo Abdulazeez



Well the thing is, $_SESSION["username"] is set.  If I change option.php to:

<?php
session_start();
echo "session username is ".$_SESSION["username"];
/*if ($_POST["option"] == "View Pending Requests")
       {
header('Location: http://intra.mdah.state.ms.us/helpdesk/viewpending.php?PHPSESSID='.session_id());
       }
*/
?>

and click on View Pending Requests, it prints:

session username is awilliam


Reply via email to