40 thoughts on “jQuery Ajax PHP Tutorial : Swap out page content on your website using PHP”

  1. I am making online exam website in php and ajax. I have doubt that how to retrieve data from user and store in database while I don't want to refresh the page when user going on next next questions and answering that question…I want to take that data through ajax so plz help me out…how I can do this…already I have shown data to user using ajax and now I want to retrieve their response in my database..so please help me sir…

  2. An extremely good guide on how to start, I was having so much difficulty with AJAX till now. Unfortunately I am using AJAX to update text on a image slider I custom coded. Seeing as I have two buttons to scroll through 3 images it's quite the challenge to get it to work :L

  3. This was an awesome tutorial. However, does anyone have any idea how to do something like this in WordPress? I am trying to, in the php file, grab the URL of a custom post type thumbnail and pass it back. I got everything working perfect until I tried to use the wpdb class to get my postID. Any help would be much appreciated.

  4. Yeah really good tutorial, but when using MySQL usually I get 503 error in the console, and it doesn't load anything and I added loading gif, so it just get stuck there, wonder how to make automatic request retry after fail.
     You can check it out on mysteriousbutton.tk

  5. Hi. I want to make a tree menu with ul li, when I make mouse over on it I need display diferent content in the web page, this contect is a submenu with images, what do you recomended to me, create divs to put the contente, or create little pages for each content so when I make mouse over I will call it pages with contenten. Let you example .costco.com Look how content change when you make mouse over on it I will apresiate your answer. Greetings

  6. If I wanted to add jquery's cache: true, to your swapContent function…. where would I add that? I'm using this function on a site that loads in different images and paragraph content but I don't want the user to have to keep re-downloading the same content when it could be cached.

    Lmk what you think, thanks!

  7. Humm… Why put | javascript: | in onmousedown=" "? It's already a javascript event attribute. Anything you put in onmousedown=" " is interpreted as javascript without having to specify it.

  8. And please i want to know how to use php and jquery to create a comment form just like this one used one youtube. Whenever a user comments it automatically adds the comment to the database and then displays the content without reloading the page.

Leave a Reply

Your email address will not be published. Required fields are marked *