PDA

View Full Version : PHP + Javascript/AJAX + Access DB



renphi
08-11-2008, 06:12 PM
I've hit a bit of a snag here. I load a simple grid (displays after an onclick event occurs inside a unique DIV). I'd like to populate that grid with data stored in an Access database based on that DIVs ID. When new data is added to that grid and the submit button is pressed I'd like it to also add that data to the Access database. Is this possible?

renphi
08-18-2008, 05:34 PM
Anyone? I can post code if necessary.

benmajor
08-18-2008, 05:49 PM
Yes, you're basically looking at sending an AJAX request to a PHP (or ASP) script somewhere on your server that runs the INSERT query for you, and then returns the new table data.

Once you have received the new table data, you must set this to the innerHTML property of your containing DIV. You can find a detailed step-by-step tutorial here:

http://www.w3schools.com/AJAX/ajax_database.asp

Thanks,
Ben