<!DOCTYPE html> <?php ?> <html lang="en"> <head> <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1"/> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/> </head> <body> <nav class="navbar navbar-default"> <div class="container-fluid"> <a class="navbar-brand" href="https://sourcecodester.com">Sourcecodester</a> </div> </nav> <div class="col-md-3"></div> <div class="col-md-6 well"> <h3 class="text-primary">PHP - Calculating The Date Of Easter</h3> <hr style="border-top:1px dotted #ccc;"/> <div class="col-md-4"> <form method="POST"> <div class="form-group"> <select name="year" class="form-control" required="required"> <option value="">Select an option</option> <?php for($i = $y; $i >= 1965; $i--){ echo "<option value='".$i."'>".$i."</option>"; } ?> </select> </div> <center><button class="btn btn-primary" name="get">Get Easter Date</button></center> </form> </div> <div class="col-md-8"> <?php include 'display_easter.php'?> </div> </div> </body> </html>
<?php $year = $_POST['year']; echo "<h2>The actual date is:</h2>"; echo "<center><h3 class='text-primary'>".get_easter($year)."</h3></center>"; } function get_easter($year){ return $date; } ?>