I have an HTML form using the jquery datepicker to insert the date into a MySQL database using PHP post form variable. Everytime I try to insert the date it inserts the date as 0000-00-00. I've been looking around for the solution and I can't seem to find it. My code is below.
<input type="text" name="release_date" id="datepicker" size="40" required>
$sql = "INSERT INTO books(title, description, price, release_date, quantity, active) VALUES ('$title','$description','$price',$date,'$quantity','$active');";
The release_date field in my database table is set to DATE.