Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End php, mysql, and ajax

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27378
    ayyaiyai
    Participant

    Hi there,

    I have a .php page that I’m using to display a repeat region from a mysql database. I was wondering if there is any script or technology that would allow me go to show next set records in my database without refreshing the page. I’ve heard ajax can do this, but I only seem to be finding ajax and xml tutorials. Is there a way I can do this with javascript? Any links or suggestions would be greatly appreciated.

    Thanks :)

    #68804
    Chris Coyier
    Keymaster

    I guess in short, you set up a file called something like getmore.php. That PHP file connects to the database and gets whatever it needs. It probably accepts POST parameters to adjust what it’s getting. Then you have an event on your page that JavaScript is watching. Like a click handler on a button. When that event fires, you do your AJAX thing pulling from the getmore.php file. Upon success of the AJAX event, you append what it returns to the page.

    I know that’s rather abstract, but that’s how it works.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.