1

If the application is already open in a tab with session_start() function in a browser, how do I prevent it from being opened in another new tab?

What session related functions could I use?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • 3
    SESSION has nothing to do with browser tabs and you can't actually do what you want by using the PHP session. You've to find another way. – Twinfriends Jan 30 '18 at 15:09
  • i open my php project with admin username and password in one tab.but when i open it again in the other new tab by again giving username and password it opened it again .i dont know how to limit it so that if an admin is online it can't be online anywhere else to avoid duplictions.i hope you understand my question to some extent now – Fahad Shahzad Bhatti Jan 30 '18 at 15:15
  • store session in database with unique key on unique user name, so that session can not be duplicate,if entry is exist don't allow to login prompt already logined – Ganesh Kandu Jan 30 '18 at 17:40
  • Possible duplicate of [PHP /SESSION: Login one per user?](https://stackoverflow.com/questions/3643591/php-session-login-one-per-user) – Scriptman Jan 31 '18 at 10:17
  • @Scriptman tahnks alot.will you please vote my question ? thanks in advance – Fahad Shahzad Bhatti Jan 31 '18 at 10:58

0 Answers0