Regarding php session

tell me how to do
1)check session is present or not
2)until there is a session then it must redirect to page “products.php”
3)if there is no session also create one session and then redirect to the
page “products.php”

There is no need to open a 3rd thread about the same piece of code.
Thread closed.