Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am designing a live demo version of a software I wrote. The database is modeled using MySQL, and comes with dummy data ready to use. What I would like to do is to have it generated the time a user signs in to try the demo, and have it be removed after he/she logs off or closes the system. What would be the best approach to solve such problem?
when a user login you can open a transaction in the database and never do the commit, then when he log out you just do a rollback or wait for database session expires.
This solution is easy to implement and the changes will be not visible for other users.
http://dev.mysql.com/doc/refman/5.6/en/commit.html
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am working on a school project. The assignment is to recreate our own version of Ebay. A requirement is to display the number of logged in users. What is the best way to do this? We are using PHP.
We are using a database so we could save the amount of loggins there but there is no proper way to decrease this amount since people often just leave the site without logging out.
Some suggestions would be awesome!
you could have a heartbeat script that updates a datetime on the user column.
and the show logged in users script could get all logged in users with time < 5 mins
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am working on an ERP System(Website) developed in php(Laravel).The requirement which i need to implement is that when ever there is no internet but if a user wants to submit data,he/she could do that and when internet comes and website start working.i want that offline data to be retrieved.
Happy Coding!
This maybe sound like a workaround. But you could do that by using localStorage of your browser. if you choose this path you have to check periodically whether the internet is available in the client machine. And also check the localstorage to look for data to submit. Of course you'll have to use javascript to check what i'm suggesting
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I have a PHP mySQL site that uses SESSIONS. the users work on Forms for sometimes multiple hours. We have no issues with session timeouts, but I am receiving complaints that when they plug the iPad in during one of their form inputs, it kills the session and they have to log back in, loosing all of the data input. I am at a loss on this one. AJAX isn't an option at this time.
Any ideas on what to check?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
After hours of trial and error, using WAMP i made a login system that mails me locally ( password recovery etc). I want to make pages that only the user has information tailored to the user, think of it as a profile page Facebook or Twitter, the news updates.
You can use sessions. In php you can type session_start(), then you can store some information about the user. So if the user don't have a session he can't access the page. Search about session_start(). You will find many examples about it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am buiding a licence style system where a user can buy one or a number of licences. They can then log in to the system only once with each licence (similar to Spotify). So a user buys 2 licences. They can log in once in Firefox and once with Chrome. If they try to log in using IE the system will prompt/warn that they will be logged out of another session.
I understand a user could just use multiple instances of the same browser to gain access to multiple sessions/screens but thats fine. We are really only trying to stop users from using multiple devices (2+ separate PCs) if their licence restricts.
Any idea how I would go about this? Can I check session data from another instance or should I store the logins in a separate table and check against that?
Thanks