Grow your CSS skills. Land your dream job.

php, mysql, and ajax

  • # December 30, 2009 at 8:57 am

    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 :)

    # December 30, 2009 at 8:00 pm

    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)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".