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