how to set end date automatically validate duration 1 year? I have start date and end date . The package validation is 1 year from the date customer select or pickup start date for example 2.11.2017 - 2.11.2018 . Now I already have start date and end date form and mysql for that part is not the problem. My problem is how can I set after user pick date from start date and end date automatically appear end date (validation duration) for 1 year? I did not know how to set end date automatically. curently I set end date validate from today to one year. Do i need add javascript? How?
# I just copy the important part. Help me..
What I have tried:
Your Package Start Date (Select Date) :
" name="startdate">
Your Package End Date :
<input type="date" value="<?php echo date('Y-m-d',strtotime(date("Y-m-d", mktime()) . " + 365 day"));?>" name="enddate">
<?php
$connection = mysql_connect("localhost", "root", "");
$db = mysql_select_db("workshire", $connection);
if(isset($_POST['submit'])){
$startdate = $_POST ['startdate'];
$enddate = $_POST ['enddate'];{
//Insert Query of SQL
$query = mysql_query("INSERT INTO `talent_pool` (`start_validate`,`end_validate`)
VALUES ('$startdate','$enddate')");
echo "
You Register Success";
}
}
mysql_close($connection); // Closing Connection with Server
?>