[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

The best way to fill db rows in certain way that i can get each details to be displayed on it related div using XMLHttpRequest

Posted on 2015-01-22
3
Medium Priority
?
40 Views
Last Modified: 2016-05-20
Hello
I do need to make a database fetch using jquery  XMLHttpRequest
so i need to get related rows in the db query to be arranged in a way where i can get them displayed on the XMLHttpRequest response each details on their related div

What i exactly need the jquery function + php file ( i can take care of the db query stuff )


Thank you.
0
Comment
Question by:jaylab2
2 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 40563987
This article should help you get started:
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/A_10712-The-Hello-World-Exercise-with-jQuery-and-PHP.html

PHP can turn almost any kind of data, including rows from a data base into a JSON representation.
http://php.net/manual/en/function.json-encode.php

You will probably want to learn about using JSON with jQuery (and if you truly understand jQuery, you will probably want to move to AngularJS instead).
http://api.jquery.com/jquery.getjson/
http://api.jquery.com/jquery.parsejson/
http://www.sitepoint.com/ajaxjquery-getjson-simple/
0
 

Author Comment

by:jaylab2
ID: 40564127
Hello
Thank you Ray for your reply but i get into these but it get a little bit confused can you please
give a small and simple example here that could make my life easier
Thank you in advance.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month19 days, 17 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question