Ajax

JavaScript quietly requests a PHP page in the background and drops the answer into the page. Two files are always involved: the page you look at, and the PHP page it calls.

1.1-basics.html — The bare mechanism
Calls getDBstuff.php and replaces some text. No database yet.
2.3-dbExample.html — Looking something up in a database
Calls 3-getAddresses.php.
3.4-ajaxExample.php — Looking up student marks
Calls 4-marksLookup.php.
4.5-newStudentInfo.php — Sending information back
Ajax that writes as well as reads, via 5a-submitInfo.php.
5.recap/ — A complete small app
Everything above, put together properly.

These examples use two different connection files: database.php and database-students.php. Check which one an example includes before you wonder why a table is missing.