By Sam on June 22, 2011
Impossible? No! Just add some AJAX to your <head> section: <script type=”text/javascript”> function request(query){ if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();} else{xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);} xmlhttp.open(“GET”,”query.php?q=”+query,true); xmlhttp.send(); } </script> and create the new page query.php with the following content, replacing the default values where necessary: <?php $dbhost = ‘#REPLACE THIS#’; $dbuser = ‘#REPLACE THIS#’; $dbpass = ‘#REPLACE THIS#’; $conn = mysql_connect($dbhost, [...]
Posted in Blog | Tagged AJAX, don't try this unsupervised, javascript, php, sql |