Im trying to insert date with range of date using of inputs
here is what i got in HTML
<input type="date" id="startdate" name="startdate"/> //ex. value="2018-12-18"
<input type="date" id="enddate" name="enddate"/> //ex. value="2018-12-31"
my PHP code is
$db = mysqli_connect('localhost', 'root', '', 'database');
if(isset($_POST['submit']))//this is my submit button
{
$startdate = $_POST['startdate']
$enddate = $_POST['enddate']
$query = "INSERT INTO appointment (date) VALUES (//i want to insert all covered date from start to end)";
mysqli_query($db, $query);
}
my database table is column is id(auto increment) date and schedule. how can i input the date from "2018-12-18 to 2018-12-31 in row"
i want my output in my table like this:
| date |
|2018-12-18|
|2018-12-19|
|2018-12-20|
|2018-12-21| //so on and so fort until reach the end date