Jump to content

Undefined Index


anton_1

Recommended Posts

want to carry over session to help page? but getting the error undefined index.

 

Any help would be greatly appreciated!

 

//getting my value from database table and put it into session

$_SESSION["user_firstname"] = $data["Firstname"];

 

 

//decides on where the user gets re-directed to.

if ($_SESSION["user_priority"] == '1')

        {

            header("Location: AdminSection.php");           

        }

        else

        {

header("Location:LoggedIn.php");

}

 

if ($_SESSION["user_times_loggged_in"] == '0')

{

 

header("Location:UsingTheSystem.php");

}

 

 

 

 

//Help page

<?php

 

session_start();

$name = $_SESSION["user_firstname"];

 

echo $name;

?>

 

any idea why its not picking up the session?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/260206-undefined-index/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.