Solution 1 :

The session variable of a site is the same for all tabs and windows opened in the same browser.
Think when you are logged in somewhere, the tabs all gets logged in then. This is often done using session.

Maybe use post or get in a form to distinguish, maybe by using timestamp

Please share your code and I will take a look at it

Problem :

I have this php application to manage different projects. The users inserts and updates data in a postgreSQL DB. Each project has a different schema inside DB. However, because the project a user is working on is a session variable any change of project made on a tab changes every other tab opened by this user. This is making some users insert data to the wrong project.

I understand that the session variable is not the correct way to implement this but i currently don’t know how can I use forms to change the project without interfering with the other tabs.

Comments

Comment posted by AbraCadaver

Maybe track the project in a hidden input in the form they are submitting.

Comment posted by caidentro

but when i use get wouldn’t all tabs receive this variable also?

Comment posted by DavLin

Do you understand there is a difference between backend and frontend? Where do you save your data? Please post your code

By