Best way to maintain information during a session

I’m working on an application where users can create teams and add people to those teams. You create your team on the team page and then add members on the members page. By design, you have to create a team first. Once team information is saved to db, you are directed to the members page, which needs to know what team was just created. Two ways to do this that I can think of are:

  1. send an id like this “members.php?team_id=1” that can be retrieved on members.php with $_GET.
  2. Use a session to $_SESSION[‘team_id’] = 1;
    Is there a best practice for this kind of thing? Is there a better way?

Well, if you should need to keep the id across multiple pages, the session would be best; if however, you are only carying it over to one page either is fine (note: visually the session id is ‘hidden’ while GET it is visible in the url - so if that matters to you, again sessions would be the avenue)