text: Q:
  
  Undefined index: steamid
  
  I have been searching for a solution and can't find one so the best place to ask is StackOverFlow.
  I keep getting the error Undefined index: steamid(Line 54)
  The Error Is Coming From $steamid = $_SESSION["steamid"]; on the welcome page.
  The session_start(); is defined in the header.
  This is the welcome page that users get re-directed to after logging in.
  ------------------ This is The Welcome page ------------------
  <?php include('../header.php'); ?>
      <?php include('../footer.php'); ?>
  
      <?php
      $steamid = $_SESSION["steamid"];
  
      require('../int/dbinit.php');
  
      $sql = "SELECT steamid FROM users WHERE steamid='". $steamid ."'";
      $result = $conn->query($sql);
  
      if ($result->num_rows > 0) {
          die("<!-- ACCOUNT ALREADY EXISTS! -->");
      }
  
      $sql = "INSERT INTO users (steamid) VALUES ('".$steamid."')";
  
      if ($conn->query($sql) === TRUE) {
        echo "<!-- ACCOUNT HAS BEEN CREATED! -->";
      } else {
        uhoh("Error while creating account: " . $sql . "<br>" . $conn->error);
      }
  
      ob_end_flush();
  
  ------------------ This is some of the Login Page ------------------
    foreach ($json_decoded->response->players as $player)
                  {
                      /*echo "
                      <br/>Player ID: $player->steamid
                      <br/>Player Name: $player->personaname
                      <br/>Profile URL: $player->profileurl
                      <br/>SmallAvatar: <img src='$player->avatar'/> 
                      <br/>MediumAvatar: <img src='$player->avatarmedium'/> 
                      <br/>LargeAvatar: <img src='$player->avatarfull'/> 
                      ";*/
                      $_SESSION["steamid"] = $player->steamid;
                      $_SESSION["personaname"] = $player->personaname;
                      $_SESSION["profileurl"] = $player->profileurl;
                      $_SESSION["avatar"] = $player->avatar;
                      $_SESSION["avatar_medium"] = $player->avatarmedium;
                      $_SESSION["avatar_full"] = $player->avatarfull;
                      /*var_dump($player);exit;*/
  
  A:
  
  Use isset() function to check whether it is defined or not.  
  $steamid = isset($_SESSION["steamid"]) ? $_SESSION["steamid"] : '';
  
  