This is my situation. There are some links related to different topics like music,sports,science,politics....etc. Here each topic has their own list of experts. Also there are going to be experts related to multiple topics. For example expert 'A' may deal with the topic sports and politics. Here each expert have their own user name and password. So when they login the topics will be listed related to them.
According to our case expert 'A' will be getting a list with topic link sports and politics. When expert 'A' click on sports a separate pop up window will open and the variable topic is registered as a session variable which has a value 1 topic id for 'sports'.
<?
session_register("topic");
$topic=1; // here topic id 1 is for sports room
?>
In this window this expert 'A' will be chatting live with the users who are from the sports room and answering their questions. Here all the conversations are inserted in the database table with the the topic id (here topic id= 1 -->for sports). But at the same time this expert may click on the topic 'politics' from the main page and that also opens a separate popup window and the same program is loaded with the current topic id.
Here comes the problem. I want to register this topic id in a session like i did for the first topic 'sports'. So when i register this in a session, this session variable overwrites the previous one and the topic id will have a value 2 (that is topic id is=2 --> for 'politics'). After that what happens was ,the records are inserted in the table with the topic id 2.
So i 've dropped the idea of registering the session varaible and simply pass the value in the query string like discuss.php?topic=2
Since the discussion area page has to be refreshed on reqular time intervals i have to pass the value of topic id all the times. Actually i want to avoid the values passing thru a query string.
Can anyone suggest me the better option than this and how to handle these topic id varible as a session variable.
Thanks