How can I protect the following code from CSRF?
$.post("lib/newEmployee.php",{employee_id: employee_id, employee_name: employee_name},
function (output){
//code
});
And here is my form (it is submitted after being validated with jquery validate):
<form id="new-employee" class="inline-input" action="#" method="post"/>
<div class="employee-container">
<div class="field-box">
<input type="text" class="input-block-level" id="employee_id" name="employee_id" autocomplete="off">
</div>
<div class="field-box">
<input type="text" class="input-block-level" id="employee_name" name="employee_name" autocomplete="off">
</div>
<div class="field-box">
<button type="submit" class="btn btn-success btn-block">New Employee></button>
</div>
</div>
</form>