unidox Posted November 21, 2007 Share Posted November 21, 2007 Is there anyway I can have a live update of sql. So when someone adds a new user to the db in a popup, after they press submit, it updates the sql info that is being printed, every x seconds. So its like a live feed. Link to comment https://forums.phpfreaks.com/topic/78247-update/ Share on other sites More sharing options...
trq Posted November 21, 2007 Share Posted November 21, 2007 Sounds like Ajax to me. Link to comment https://forums.phpfreaks.com/topic/78247-update/#findComment-395950 Share on other sites More sharing options...
unidox Posted November 21, 2007 Author Share Posted November 21, 2007 Ok, I will post there. Unless someone can help me here? Link to comment https://forums.phpfreaks.com/topic/78247-update/#findComment-395951 Share on other sites More sharing options...
revraz Posted November 21, 2007 Share Posted November 21, 2007 Refresh your page every x seconds Link to comment https://forums.phpfreaks.com/topic/78247-update/#findComment-395987 Share on other sites More sharing options...
unidox Posted November 21, 2007 Author Share Posted November 21, 2007 well heres my issue I have a mysql query with a while statement, so it prints all the users in a db and I have a popup to add/edit a user. And when the popup closes u have to refresh the page to have it show the updates. Is there a way I can have it refresh just the div, or even just the sql every x seconds? I have a switch statement for $_GET['page'] so the refresh cant use GET otherwise it shows the default. How will I go about doing this? Link to comment https://forums.phpfreaks.com/topic/78247-update/#findComment-396255 Share on other sites More sharing options...
premiso Posted November 21, 2007 Share Posted November 21, 2007 As stated above, ajax. Link to comment https://forums.phpfreaks.com/topic/78247-update/#findComment-396269 Share on other sites More sharing options...
unidox Posted November 21, 2007 Author Share Posted November 21, 2007 Yea, I am not really familair with ajax, how would I go about doing it. I googled it, but found nothing Link to comment https://forums.phpfreaks.com/topic/78247-update/#findComment-396273 Share on other sites More sharing options...
premiso Posted November 21, 2007 Share Posted November 21, 2007 Use javascript to detect the pop-up window close or add an event to the window close button that triggers an event on the main page to tell the page to retrieve the information from the remote script for an update and display it in the div....unless I am missing something that is about all you would need to do. Link to comment https://forums.phpfreaks.com/topic/78247-update/#findComment-396275 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.