How to Create Simple Age Calculator in PHP

Good day! This tutorial is all about How to Create Simple Age Calculator in PHP
Age Calculator can be used to automatically calculate the age of a person by putting in his/her birthday. With the help of this it can easily calculate ages of a person. It is an effective feature to be put in a project systems.

Creating the Age Calculator please put this codes:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Simple Age Calculator in PHP</title> <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css"> </head> <body>

How to Create Simple Age Calculator in PHP?

Birthday:
<button type="submit" name="calculate" class="btn btn-primary">Calculate</button> </form> <?php if(isset($_POST['calculate'])){ $bday = $_POST['birthday']; $today = date('Y-m-d'); $diff = date_diff(date_create($bday), date_create($today)); ?>
'.$diff->format('%y').''; ?>
<?php } ?> </div> </div> </div> </body> </html>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Simple Age Calculator in PHP</title>
	<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
</head>
<body>

That’s It! Go and Run the Program!


If you have any comments or suggestions about How to Make Simple Age Calculator in PHP Please message us directly

Download Source Code Here:

Other Articles you might read also:

Leave a Comment