u214 Posted June 11, 2011 Share Posted June 11, 2011 Hello! Well I'm here asking for advice on how would YOU do this: Here's an image. As you can see, you see "Username's Statistics", "Value" and "Change Value ( with input text )" Ok. I want to, for example, if you select to change the "Admin Level", how would you do it WITHOUT having to refresh the page? Instant mysql query into database after you hit enter on the input value! The current "Value" will be overwritten with the new one that you just inputted. So please, if you can, prove 1 example that I can teach my self from. Thanks. PS - No, that's not a real password ._. Quote Link to comment https://forums.phpfreaks.com/topic/239051-your-way-of-doing-this/ Share on other sites More sharing options...
spiderwell Posted June 11, 2011 Share Posted June 11, 2011 I would use ajax, or jquery to implement such a change, and if you google either subject with things like edit in place you can find an example very easily the way i do it is that there are no input boxes on show by default, and they replace the existing text, when you double click the text (under value column for instance). Quote Link to comment https://forums.phpfreaks.com/topic/239051-your-way-of-doing-this/#findComment-1228270 Share on other sites More sharing options...
fugix Posted June 11, 2011 Share Posted June 11, 2011 I believe that in your case, Ajax, or asynchronous JavaScript and XML, is the way to go. It sends a request to the server via the xmlhttprequest object, without the need to refresh the page. If you are not familiar with how to implement Ajax into your code, visit https://developer.mozilla.org/en/AJAX Edit: you can also use jquery's Ajax api Quote Link to comment https://forums.phpfreaks.com/topic/239051-your-way-of-doing-this/#findComment-1228351 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.