Where exactly do I put a SESSION_START?

authentication, php, session

Solution

Put it after your PHP start tag `<?php` ... like this

<?php
session_start();
//... your code....


//more code....

Read more on sessions from the PHP Manual. `Here`

Note : Also keep in mind, you need to call `session_start();` on each and every page if you are making use of session variables.

Problem

So I'm starting my own website and I have the login file pretty much made. I just need to figure out where to put the session_start to keep the user logged in. Where exactly do I put the session_start? Do I put it right in the login file? Or where do I put it? Thanks for the help

Original source

Related problems