+ 1

Transfer variables via PHP

How would I get variables for example, our PHP file, data.php, and index.php If I were to hand over the username to data.php and then that can transfer to other files, how can I get them from other files, not just one? Like, do I use $_SESSION[“Username”]? So I can be like <?php $_SESSION[“Username”]?> or how?

11th Feb 2018, 6:52 PM
epic gamer
epic gamer - avatar
1 Antwort
0
Yes i think that's the most common one to use session_start() on every page.
11th Feb 2018, 9:51 PM
Toni Isotalo
Toni Isotalo - avatar