I have datepicker
<input class='form-control formBlock datepick' name='period_startdate' value='' type='text' placeholder="Enter First Work Date..." required>
datepicker script
<script>
$('.datepick').each(function(){
$(this).datepicker();
});
</script>
sql statement
[other variables...]
//datepicker variable
$period_startdate=$_POST['period_startdate'];
$insertpayperiod= $db->prepare("INSERT INTO payroll (pay_name,pay_group,payday,gross_paycheck,payrate,annual_gross_income,pay_slip_type,pay_rate_unit,total_weekly_hours,total_yearly_hours,created_byid) VALUES (?,?,?,?,?,?,?,?,?,?,?)");
$insertpayperiod->bind_param("siiiiissiii",$pay_name,$paygroup,$payday,$gross_paycheck,$payrate,$annual_gross_income,$paysliptype,$payrateunit,$total_weekly_hours,$total_yearly_hours,$createdbyid);
MysQl Date format
0000-00-00
How can I convert this to mysql date and make an insert? I have taken notes here. I did read the manual. But while I somehow understand the concept I cant wrap my head around doing it dynamically :-/