It actually prints session variables, but you haven't set them yet, so the array returned by print_r ($ _ SESSION) is empty, try setting the variables first, and then printing them.
Remember that session_start (); There should always be the first line.
source share