I have a login system in PHP. I save the user's login and password in a session.
Start it as follows:
// Inicia a sessão
session_start();
My question and how to do this session has a duration of 30 minutes, ie if the user leaves the page stopped for 30 minutes the session has to be deleted.