how to run php function without reloading the page
I am a newbie to php
<?php
getDBData(){
//log the call
$fetchedData = myDbCode.fetchData();
return
}
?>
<script type="text/javascript">
dbData = <?php echo json_encode(getDBData()); ?>
</script>
As observed in the log that getDBData get called only once during the page
loading and later on even with dbData = <?php echo
json_encode(getDBData()); ?> this code the call to getDBData() doesn't
happen.
Any idea why the call to getDBData() happening only on page load and not
thenafter
How to call getDBData() from javascript
No comments:
Post a Comment