I'm trying to make a queue management system for a school project and I want to display the queue list using database table and I want it to update live without refreshing the web. How to display a database table data that is automatically updating ( no need to refresh) using Codeigniter? I'm trying to make a queue management system and I want to display the queue list using database table and I want it to update live without refreshing the web. Someone advice me to use Ajax but I don't know how to use it yet. Please help me I need some detailed explanation or reference code.
How to display a table data that is automatically updating using codeigniter?
Yeah, AJAX is probably the way to go. You cannot push updated info from the server (and the PHP running there) to the browser -- the browser has to periodically request data and then update the HTML in the browser. On the CodeIgniter side you'll probably want to set up a dedicated API endpoint that will return the data used for the table, most likely in JSON format; then you'll have to implement some JavaScript AJAX functionality (perhaps using jQuery?), which can both initially populate the HTML table, and then periodically send additional requests to update it.