If it works on localhost and not the live that implies it is a server configuration issue. Most likely session variables aren't being stored properly.
The solution is usually to contact your hosting provider and make sure the session_save_path setting in your php.ini file is set to a directory that exists and has the proper permissions.
To test if it is a general session storage issue, create two pages. One that sets a session variable like:
<?php
@session_start();
$_SESSION["works"] = "true";
?>
Then create the second page to write the session variable with:
<?php
@session_start();
die($_SESSION["works"]);
?>
If you visit the first page and then the second... the second page should say "true". If it is blank or shows an error that means your session_save_path is wrong and most likely your hosting provider will have to fix it for you.