Professional Documents
Culture Documents
PHP 10
PHP 10
---------------------------------------------------------------------------------------------------------------------------
Assignment no: 10
Assignment Name: Write a php script to find leap year or not.
---------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width initial-scale=1"/>
</head>
<body align=center>
<h2> The Leap year</h2><br><hr><br>
<form action="leap_year.php" method="post">
<input type="text" name="year" /><br><br>
<input type="submit" />
</form><br><hr><br>
<font color="black">
<?php
if( $_POST )
{
//get the year
$year = $_POST[ 'year' ];
Page no:-21
echo "$year is not a leap year";
}
?>
</font>
</body>
</html>
Page no:-21