2
Good morning to you all! Gentlemen, I need guidance, and I also need to know if you have what it takes. It is as follows: I have a table in my database that records users who are logged in, it follows:
What I want to do is, every time a login is done (in addition to the normal login routine) is checked in this table if the guy is logged in or not. If he is logged in, I want to compare the sessions that are in the bank and the one that I will take at login time, and update the session, date and ip. If the comparison goes wrong, I want to update the new information, and the session that was there was destroyed.
Can you do that? Thanks in advance!
What have you tried?
– Sr. André Baill
I logged in normal, my big doubt is to destroy the registered session at the bank, and update with the new session, and in doing so, the machine where I was logged in earlier, miss the session with the bank. That part I haven’t done much yet
– José Allison
At the time of logging in, check if the date is today’s date, for example and if the login is already logged in, if it is, you delete this record and already enter another one, thus updating the :)
– Sr. André Baill
I get it. In this case, just update if the record already exists. If it does not exist, enter a new normal?
– José Allison
Also, if you want to update, otherwise delete the record and insert the new one, which gives in the same, in my opinion
– Sr. André Baill