I am working on a simple `PHP` web-application. And in that I want to get Id of user from the `mysql` database.

For that I have used session to store userID as soon as user in inserted in database: 

```
session_start();
$_SESSION['customer_id']=mysqli_insert_id($con); 

```

But it always says that undefined index customer\_id on other pages.It is working fine on localhost but not on live server.