PHP MYSQL query

How can i insert date into mysql database which has column DOB- ‘date’ as its datatype, from web form which has field named DateOfBirth which also has input type=“date” using php. Formats for both are different.

So how can i insert the correct date to mysql database.
Please help. I am stuck.

MySQL will only take a date in ISO format: YYYY-MM-DD
So, you’ll have to format the data that comes from your web form into the correct format before inserting it into your MySQL table.

I would have to see the code for your webform to help any further.