Professional Documents
Culture Documents
PHP Report
PHP Report
1. INTRODUCTION
What is Function?
PHP functions are similar to other programming languages. A function is a piece of code
which takes one more input in the form of parameter and does some processing and returns a
value. It’s very easy to create your own PHP function.
G.P.KHAMGAON Page 1
AGE CALCULATOR
The PHP date () function formats a timestamp to a more readable date and time.
Syntax:
Get a Date
The required format parameter of the date () function specifies how to format the date (or time).
Here are some characters that are commonly used for dates:
Other characters, like"/", ".", or "-" can also be inserted between the characters to add additional
formatting.
Example:
<?php
?>
G.P.KHAMGAON Page 2
AGE CALCULATOR
2. REQUIREMENTS
software requirements
1. Xampp Server
2. Notepad++
Hardware Requirements
1. Computer system
2. Ram 2GB above
3. Hard Disk 500
G.P.KHAMGAON Page 3
AGE CALCULATOR
3. TECHNOLOGIES USED
1. PHP
2. HTML
3. CSS
G.P.KHAMGAON Page 4
AGE CALCULATOR
1. PHP
PHP is a server side scripting language. That is used to develop Static websites or
Dynamic websites or Web applications. PHP stands for Hypertext Pre-processor, that earlier
stood for Personal Home Pages. PHP scripts can only be interpreted on a server that
has PHP installed
G.P.KHAMGAON Page 5
AGE CALCULATOR
2. HTML
HTML is used to create electronic documents (called pages) that are displayed on
the World Wide Web. Each page contains a series of connections to other pages
called hyperlinks. Every web page you see on the Internet is written using one version of HTML
code or another
HTML code ensures the proper formatting of text and images for your Internet browser.
Without HTML, a browser would not know how to display text as elements or load images or
other elements. HTML also provides a basic structure of the page, upon which Cascading Style
Sheets are overlaid to change its appearance. One could think of HTML as the bones (structure)
of a web page, and CSS as its skin (appearance).
G.P.KHAMGAON Page 6
AGE CALCULATOR
3. CSS
CSS stands for Cascading Style Sheets
CSS describes how HTML elements are to be displayed on screen, paper, or in other
media.
CSS saves a lot of work. It can control the layout of multiple web pages all at once
External style sheets are stored in CSS files
CSS is the language for describing the presentation of Web pages, including colors, layout,
and fonts. It allows one to adapt the presentation to different types of devices, such as large
screens, small screens, or printers. CSS is independent of HTML and can be used with any
XML-based markup language. The separation of HTML from CSS makes it easier to maintain
sites, share style sheets across pages, and tailor pages to different environments.
CSS can style almost any HTML tag that creates a visible element on the page, including all the
HTML tags used to create headings, paragraphs, links, images, lists, and tables.
Specifically, CSS allows you to style: Text size, color, style, typeface, and alignment. Link color
and style.
G.P.KHAMGAON Page 7
AGE CALCULATOR
4. CODE
<?php
$res = false;
if (isset($_POST["submit"])) {
$dob_val = $_POST["dob"];
$res = true;
?>
<html Lang="en">
<head>
<style type="text/css">
G.P.KHAMGAON Page 8
AGE CALCULATOR
</style>
</head>
<body background="blur.jpg">
<header><marquee><fontcolor="white"size="450"><u>AGECALCULATOR</u>
</font></marquee></header>
<br>
<br>
<br>
<div id="php">
<hr width="100%">
<form method="post">
<p> <b>Select The Date Of Birth : <input type="date" name="dob" required /></p>
<hr width="100%">
<hr width="100%">
<?php
if ($res) {
G.P.KHAMGAON Page 9
AGE CALCULATOR
?>
</td>
</form>
</div>
</body>
</html>
G.P.KHAMGAON Page 10
AGE CALCULATOR
5. OUTPUT
G.P.KHAMGAON Page 11
AGE CALCULATOR
6. ADVANTAGES
G.P.KHAMGAON Page 12
AGE CALCULATOR
7. CONCLUSION
In this project, we had build Age Calculator using PHP, JAVASCRIPT and HTML. We
had successfully implemented the date () to get current date in PHP. The PHP date () function
formats a timestamp to a more readable date and time. There are some characters that are
commonly used for dates that is d, m, y.We have also used xamp server to run the project, Xamp
server is the open source server.
G.P.KHAMGAON Page 13
AGE CALCULATOR
8. REFERENCE
https://buddypunch.com/uncategorized/business-advantages-using-time-clocks/
https://www.w3schools.com/php/php_date.asp
https://www.w3schools.in/php/date-time/
https://en.wikipedia.org/wiki/Yahoo!_Widgets
https://en.wikipedia.org/wiki/PHP
https://www.geeksforgeeks.org/php-date_default_timezone_set-function/
G.P.KHAMGAON Page 14