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. Quote Link to comment Share on other sites More sharing options...
trq Posted November 21, 2007 Share Posted November 21, 2007 Sounds like Ajax to me. Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
revraz Posted November 21, 2007 Share Posted November 21, 2007 Refresh your page every x seconds Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
premiso Posted November 21, 2007 Share Posted November 21, 2007 As stated above, ajax. Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.