Come posso proteggere il seguente codice da CSRF?
$.post("lib/newEmployee.php",{employee_id: employee_id, employee_name: employee_name},
function (output){
//code
});
Ed ecco il mio modulo (è inviato dopo essere stato validato con 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>