I need to update a database table using javascript in my html page , what i need is when loading this page i want to update the date in database every 30 sec
var timer = setInterval(function(){
updatetime() // i want to call the php function from java
},30000);
<?php
function updatetime(){
$query="UPDATE user SET time='......"; // here i update the database
$result=mysql_query($query);
}
?>
mysql_*functions. Use PDO / MySQLi instead