I am a little confused with what you are trying to do. Are you trying to create a trigger that will automatically do the following query?
UPDATE
employeemaster
SET leave_type=leave_type-".$numberofleave."
where empcode='".$empcode."'
Then I think you want to write the trigger as this:
CREATE TRIGGER leave_trigger
AFTER INSERT ON leaveapplication
FOR EACH ROW
UPDATE employeemaster SET leave_type=leave_type-NEW.numberofleave where empCode=NEW.empCode
END;
In the trigger, you don't want to use any variables from PHP with specifics. You want to insert the data into one table (leaveApplication) and then have the trigger use the data in that table to update the employeemaster. If you hardcode the data in the trigger, you will either need to create a trigger for every row of data in the employeemaster or the trigger won't work as expected.