How to get mysql result with jquery without refreshing?
-
I want to get the mysql results without refreshing the page. Even if i manually insert values to mysql table, it should be on the page without any refresh or form submission. I know this should be done with jquery. Please give me the code to do this successfully. Thanks...
-
Answer:
it's rely simple. All you need to do is ajax method with following attributes : client side: jquery code with ajax method 1.) url to which the php code will iterate your mysql database 2.) data to be sended. will be inside data attribute in json form. 3.) write methods after you receive a response i.e. json too. server side with php/mysql 1.) get data with $_GET method . in your case person id 2.) look into db. 3.) encode using echo json_encode(->data<-);
Jacky DJ at Yahoo! Answers Visit the source
Other answers
You can do it without jQuery as well: Download the four free scripts "basic php site 1 to 4" from http://web2coders.com, and some other examples on how to use AJAX. JQuery is fine, but it is a big library, and the $ sign you have to use on every call often leads to problems when mixed with other languages...
just "JR"
you can use $('body').on('submit', '#yourId', function () { }); if jquery version is new or else use .submit() http://api.jquery.com/submit/ then use $.post() method. http://api.jquery.com/jQuery.post/
Viran
Related Q & A:
- How To Get Microsoft Points For Free Without Surveys?Best solution by Yahoo! Answers
- How To Get Free Money On Psn Without Points?Best solution by freepsncodes-5ways.blogspot.com
- How to arbitrariarly sort MySQL result set?Best solution by Stack Overflow
- How to reset mysql password without old password?Best solution by Super User
- How to get current month and year in jquery?Best solution by stackoverflow.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.