S
S
Sazanovdm2021-06-13 19:50:18
PHP
Sazanovdm, 2021-06-13 19:50:18

How to check if a user is logged in?

I have a server on which I created a subdomain ooo.domain.comand set up redirection of requests to another server through DNS

Now the task is to check whether the user is authorized or not in order to understand what content to display.

On the main domain I check like this:

if (isset($_SESSION["user"]) && !empty($_SESSION["user"]))


Question: How can I check if a user is authorized on the main domain?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question