How can I call a PHP Function inside a Javascript Function? This is what I have so far, but I don't think I'm doing it the right way.
Any suggestions?
<?php
function phpQuery(){
$query = mysql_query("INSERT INTO mytable VALUES('','name','email')");
}
?>
<script type="text/javascript">
function delayQueries()
{
timeoutID = window.setTimeout(doQueries, 2000);
}
function doQueries()
{
var runQuery = "<?php phpQuery(); ?>";
}
</script>