Jump to content

Recommended Posts

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 )"

2zgcbgw.jpg

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 ._.

Link to comment
https://forums.phpfreaks.com/topic/239051-your-way-of-doing-this/
Share on other sites

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).

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.