Using .htaccess 












Using .htaccess/.htpasswd Password Protection 





Coding Tips 








Uploads and Downloads 



Mail 
see it on this page





Working with Images 


Frequently Requested Website Functionality 
see it on this page

see it on this page
see it on this page
see it on this page











Using PHP 




Website Managment 








Other Tips 









AJAX example
Asynchronous JavaScript And XML
<script type="text/javascript">
function validate(value) {
var http = false;
try {
http = new XMLHttpRequest();
} catch (e) {
try {
http = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert('This page will not work in your browser');
return;
}
}
if (value.length == 0) document.getElementById('message').innerHTML = "Enter six letters in the box";
else document.getElementById('message').innerHTML = "Keep going";
if (value.length == 6) {
var params = "value="+value;
http.open("POST","ajax.php",true);
http.onreadystatechange = function() {
if (http.readyState == 4 && http.status == 200) document.getElementById('message').innerHTML = http.responseText;
}
http.setRequestHeader("Content-type","application/x-www-form-urlencoded");
http.send(params);
}
}
window.onload = function() { document.getElementById('value').focus(); }
</script>
<div style="text-align: center;">
<input type="text" id="value" onkeyup="validate(this.value)" style="width: 60px;" maxlength="6" autocomplete="off" />
<div id="message">Enter six letters in the box</div>
</div>
<?php
function validate($value) {
if ($value == "abcdef") return "Correct";
return "Try again";
}
echo validate(trim($_POST['value']));
?>




