HTML - Single Page Template
PHP - Connection to a MySQL Database
PHP - List directory glob() vs. scandir()
PHP - Serve file
PHP - Serve CSS
AJAX - simple POST call
AJAX - create AJAX object
AJAX - simple POST call
function load(id) { var ajax = getAJAX(); var url = "/ajax.php"; ajax.onreadystatechange = function() { if (ajax.readyState == 4 && (ajax.status == 200 || window.location.href.indexOf("http") == -1)) { var response = eval('(' + ajax.responseText + ')'); alert(response); } } params = "load=" + id; ajax.open('POST', url, true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); ajax.setRequestHeader("Content-length", params.length); ajax.setRequestHeader("Connection", "close"); ajax.send(params); return false; }
links
code
download