On change of the dropdown list, A php function should called.
Inside the PHP function I will do some calculation. Later I need to set the value of a text box or else
You can't call a php function from js or html, but you can do that by ajax call to a php function where you can perform your calculation and then return the result value to js, so then you can do by js to html...
Update:
function getIPL(id)
{
$.ajax({
type: "GET",
url: "EmpLeave.php",
data: "emp_Id =" + id,
success: function(result){
$("#somewhere").html(result);
}
});
};
// Empleave.php file....
if(isset($_GET['emp_Id'])){
GetTotalPL($_GET['emp_Id']);
}
function GetTotalPL($id){
// do your calculation...
}