I am building a Datepicker (credits css/js: gijgo.com) that contains a "change" event. It allows to activate a code when the user selects a date:
<!-- Date picker script-->
<script>
$('#datepicker').datepicker({
calendarWeeks: true,
modal: false,
header: true,
footer: false,
format: 'yyyy-dd-mm',
weekStartDay: 1,
width: 133,
change: function (e) {
alert('Change is fired');
}
});
</script>
My PHP file would use the date selected as an argument to fetch data from the MySQL table
<?php
$argument1 = $argv[1];
How can I insert this PHP so that it is called "change"? Is it actually a good practice to code this way?
I just starting coding with PHP/HTML scripts. Apologies for my lack of knowledge.