is there a short code trick to check if a session has started and if not then load one? Currently I receive an error \"session already started...\" if I put in a session sta
Many people simply use @session_start() to suppress the warning that the session has already been started. The alternative is usually:
@session_start()
if (session_status() === PHP_SESSION_NONE) session_start();