Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP

PHP with AJAX

I have always admired the clarity with which the teachers at treehouse explain concepts illustrated in their videos. I have had major trouble finding a place online that clearly describes how to solve a problem I am having with my code though. I have a page that uses php and sql to display articles and videos stored on a database in a feed that users see on their profile. However, I am trying to get a link at the bottom of that list to display another/more post(s) by the currently logged user when clicked without reloading the page. I read that this is possible with PHP and AJAX. Could someone please show us how to do that?

I second that. An AJAX tutorial would definitely be helpful. In the meantime, I am hoping that Ryan and the Treehouse Team could post a link to this thread to some good intro AJAX content.

6 Answers

Wendell Pulsipher would this post help you out at all? more php jQuery projects

What else would you be interested in seeing?

okay so I went and watched that video... which did help quite a bit, but I do have another question.

I'm trying to pull information about users entries from a database. Each entry in the database has multiple rows with values that I'm trying to store in the array that's returned to my js/ajax file through the PHP file. I tried logging, as arrays, the entries and their rows from the database to the console in chrome and what I'm getting from that is this multidimensional array:

[Object, Object, Object, Object, Object, Object, Object, Object] 0: Object 1: Object 2: Object 3: Object 4: Object 5: Object 6: Object 7: Object

and each object (0-9) has an arrow next to it. When I click it the info I want to use does display as parameters of, but I can't seem to find out how to extract and use the data in each row of each object 0-9 ... I'm assuming there's some javascript tool I'm missing here?

I second that. An AJAX tutorial would definitely be helpful. In the meantime, I am hoping that Ryan and the Treehouse Team could post a link to this thread to some good intro AJAX content.

In the meantime, Wendell, I found this tutorial that is a basic intro to interfacing PHP and AJAX. Hope it may be helpful to you:

http://www.ajax-tutor.com/post-data-server.html

You may be more interested in this example actually:

http://www.ajax-tutor.com/get-data-from-server.html

thanks, but I find many text only tutorials like those you posted to not be explanatory enough for me (not in depth enough). I'll just wait and see if Ryan or any of the instructors post a video about this

Yes! Oh thank you thank you thank you thank you thank you!!! I have trying to find something like this for soooo long! I will have to tweak the types of information that goes into the 'post' submission when I apply this to my project, but all I needed was for this concept to be illustrated in detail. Thanks again :D I may be back on this thread with questions about my specific project but we'll see.

Oh, I just remember that you asked what else I would like to see. How about some Java videos? I would LOVE to learn Java as well.