PHP Final Microproject - Copy
PHP Final Microproject - Copy
On
Measurement Converter
Under Course: Web Based Application Development With PHP (22518)
Semester: 6th
Department of Computer
CERTIFICATE
This is to certify that following students of SIXTH SEMESTER Diploma Engineering
in Computer have successfully completed the Micro-Project entitled “Measurement
Converter” under my supervision, in the partial fulfillment of Course Web Based
Application Development With PHP (22619) for Academic Year 2024-2025 as per
prescribed in the MSBTE “I-Scheme” curriclum.
2
ACKNOWLEDGEMENT
With deep sense of gratitude we would like to thanks all the people who have lit
our path with their kind guidance. We are very grateful to these intellectuals who
did their best to help during our project work.
The special gratitude goes to our internal guide Mrs.V.S.Gavali, technical staff
members, and non-technical staff members, of Computer . Department for their
expensive, excellent and precious guidance in completion of this work.
Name of Students:
3
MATOSHRI AASARABAI POLYTECHNIC, EKLAHARE, NASHIK
Department of Computer
Sr.
Details Page No.
No.
Rubrics
1 5
2 Logbook 7
Signature of Faculty
4
ANNEXURE I
Rubric for Evaluation of Micro Project of Web Based Application Development
Group Members: 5
Converted Out of 6:
Mrs.V.S.Gavali
Name & Sign of Course Teacher
5
ANNEXURE II
Evaluation Sheet for the Micro Project
Academic Year: 2024-2025 Semester: SIXTH
Course: Web Based Application Development With PHP (22619) Course Code: 22619
Name of Faculty: Mrs.V.S.Gavali
Title of the Project: “Measurement Converter”
a) Practical Outcomes:-
The practical outcomes of the "Measurement Converter" microproject are diverse and can provide
valuable insights into both programming and real-world applications.
b) Unit Outcomes in Cognitive Domain:-
The project involves thinking critically to convert units of measurement accurately. Learners must
develop logic and algorithms that apply mathematical principles, fostering their ability to solve real-
world problems.
c) Outcomes in Affective Domain:-
Through repeated application of problem-solving strategies in the project (such as debugging, testing,
and refining the logic), learners will internalize these problem-solving techniques, making them part
of their approach to future challenges in programming.
Mrs.V.S.Gavali
(Name & Sign of Faculty)
6
MATOSHRI AASARABAI POLYTECHNIC,EKLAHARE,NASHIK
Department of Computer
Log Book for Micro- Project
Semester: SIXTH Programme: CO6I
Course: Web Based Application Development With PHP (22619) Class: Third Year
Topic of the Micro-Project: Measurement Converter
Member Teacher’s
Week No. Discussion & Details Teacher’s Comment
s Present Sign.
Discussion on the concept of Micro Discussed micro
1 5
project with teacher project concept
Finalization of Group and Project topic
2 5 Finalized the group
with Project Proposal submission
Preliminary discussion with guide about 5
3 Discussed with guide
content of Micro project
Related Information Gathered by team 5
4 Gathered information
about project
Organizing the information for project 5 Organized the
5
work information
Discussing project related queries with 5
6 Discussed the queries
teacher if any
Preparation of Micro project model or 5
7 Prepared micro project
content
8 Finalizing the project work by teacher
5 Finalized project work
5 Completed report
9 Report writing
writing
Presentation and Oral on project by group 5 Gave Presentation
10
members submitted project .
Mrs.V.S.Gavali
Name & Sign of Course Teacher/Guide
7
Write project Report in following sequence:-
(List the materials you used in your project and describe the procedure that you used to
perform the project. If you have a photo or diagram of your project, this is a good place
to include it.)
4. Theoretical Background
Explicitly state your hypothesis or Law, Definition or Explanation of subject
topic you can understand under this project.
5. Practical Application
What is the importance of this study? Of what use is a study such as this?
6. Bibliography
Use proper citing format for books, journals, and websites.
Websites should include author of article if given, title of article and the date the
article was posted or retrieved from website.
NOTE: Must have at least 5 reliable resources.
8
Abstract
The Measurement Converter Microproject is designed to provide an easy-to-use
tool for converting various units of measurement across different categories, such as
length, mass, temperature, volume, and more. The core objective of this project is to
facilitate the seamless conversion of units for users in various fields, including science,
engineering, and daily life, by eliminating the need for manual calculations or reference
charts.
The project utilizes a user-friendly interface where users can input a value in a
chosen unit, select the desired conversion unit, and instantly receive the corresponding
result. The system will support both metric and imperial units, enabling global usability.
The conversion process is automated, ensuring accuracy and efficiency, and the tool can
handle various complex conversions, such as temperature conversions involving
different scales (Celsius, Fahrenheit, Kelvin).
9
Introduction
In today’s globalized world, we frequently encounter the need to convert between
different units of measurement. Whether it’s calculating the distance between two cities in
different unit systems, converting temperatures for scientific purposes, or determining
ingredient quantities in recipes, unit conversions are essential in everyday life. Despite the
convenience of online tools and apps, many people still face challenges when dealing with unit
conversions, especially when working with complex units or dealing with unfamiliar
measurement systems.
The main objective of this microproject is to create a versatile tool that simplifies the
process of converting between units of measurement in different fields. It aims to:
2) Ensure Accurate and Instant Results: The system performs conversions based on
established scientific formulas, ensuring accuracy and efficiency, and providing results almost
instantly.
There are various contexts in which unit conversions are necessary. For example:
1) Globalization: As people interact internationally, the need to convert between the metric
system (SI units) and the imperial system becomes essential in industries like engineering,
construction, science, and education.
3) Day-to-Day Use: Individuals often encounter unit conversion in daily activities, such as
cooking, travel, or fitness, where understanding distances, weights, or temperatures in different
units is crucial.
10
Theorotical Background
The Measurement Converter Microproject draws upon several key concepts and theories
in both mathematics and computer science to provide an efficient, user-friendly solution for
converting units of measurement. The following outlines the theoretical foundations that
underpin the development of this project.
At the core of the project lies the concept of measurement. Measurement is the process of
quantifying a physical quantity (such as length, mass, time, temperature, etc.) by comparing
it to a standard unit. Units of measurement are defined quantities that are used to express the
amount of a physical quantity. They provide a means to quantify and communicate numerical
values across various disciplines.
The International System of Units (SI) is the most widely used standard in scientific and
everyday measurements. It is a set of internationally agreed-upon units that standardize how
physical quantities are expressed. Common SI units include:
However, various regions of the world use different measurement systems. The Imperial
System, for example, is commonly used in the United States and the United Kingdom, and
units like miles, pounds, and Fahrenheit are prevalent.
The measurement converter in this project helps bridge the gap between these systems by
converting values between the SI units and the Imperial system.
Unit conversion refers to the process of changing a value from one unit to another while
maintaining the equivalent physical quantity. It is a basic operation in mathematics and
applied science, often used to facilitate calculations in different measurement systems.
The conversion process is based on conversion factors, which are numerical multipliers that
express the relationship between two different units of measurement. For instance:
For more complex conversions (such as temperature), the formula might involve additional
mathematical operations.
Unit conversion is often based on linear equations or simple multiplication with constant
factors. However, some conversions involve more complicated mathematical relationships.
These relationships are derived from the fundamental properties of the physical quantities
involved.
For example:
12
Temperature Conversion: Converting temperatures between Celsius, Fahrenheit,
and Kelvin involves linear equations, as described earlier. The equations are derived
from the definition of each scale:
Speed Conversion: The conversion between miles per hour and kilometers per hour is
based on the relationship between the two units of length:
Algorithms: At the heart of the project lies the algorithm that takes user input, applies
the correct conversion factor or formula, and outputs the result. This involves simple
operations like multiplication or addition, depending on the conversion type.
User Interface Design: The success of the converter depends on an intuitive and
accessible user interface (UI). The UI must allow users to input a value, select the
appropriate units, and display the result clearly. In terms of web-based or software
development, this may involve HTML, CSS, JavaScript, or other programming
languages for front-end development.
Data Structures: A simple approach might use a series of if-else statements or lookup
tables to map the conversion factors for each unit type. For more advanced versions,
dictionaries or hash maps can store these conversion factors in an efficient way,
allowing for quick lookups and scalability if new units are added.
Error Handling: The program must handle invalid user input (such as entering text
instead of numbers) and handle edge cases (like attempting to convert zero or negative
values in certain contexts, such as temperature in Kelvin).
13
5. Practical Applications of Unit Conversion:
Unit conversion has a broad range of applications in both professional and everyday
contexts. Some of these include:
Scientific Research: Scientists often need to convert units when analyzing data from
different experiments or sources. For example, a chemist may need to convert between
grams and moles to calculate the amount of substance in a reaction.
Daily Life: People often convert units when cooking (e.g., converting teaspoons to
tablespoons), traveling (e.g., converting kilometers to miles), or engaging in fitness
activities (e.g., converting pounds to kilograms).
User Input Handling: Capturing the values and units entered by the user.
Conversion Logic: Using pre-defined formulas and conversion factors to perform the
conversion.
User-Friendly Interface: The tool is designed with simplicity in mind, allowing users
to input values and select units quickly. It is aimed at making the process
straightforward for people without prior technical expertise.
14
Real-Time Conversion: The system delivers instant results once the user enters the
value and selects the units, eliminating the need for manual calculations and saving
time.
Accuracy and Efficiency: The conversion formulas used in the project are based on
scientifically established standards, ensuring that users receive accurate results every
time.
The Measurement Converter Microproject can be applied in a wide range of fields, including:
Education: Teachers and students can use the tool to better understand the
relationships between different units of measurement, helping to teach and reinforce
concepts in mathematics and science.
Professional Use: Engineers, architects, and scientists can rely on the tool to quickly
convert between different units when conducting calculations, working with materials,
or analyzing data from different sources.
Daily Life: Individuals can use the converter for personal tasks such as cooking,
traveling, or exercise routines, where unit conversions are often needed.
15
Program Code :
1] index.php – The main page where the user inputs data.
<?php
include('converter.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Measurement Converter</title>
</head>
<body>
<div class="container">
<h1>Measurement Converter</h1>
<option value="meter">Meter</option>
<option value="kilometer">Kilometer</option>
16
<option value="centimeter">Centimeter</option>
<option value="gram">Gram</option>
<option value="kilogram">Kilogram</option>
<option value="celsius">Celsius</option>
<option value="fahrenheit">Fahrenheit</option>
</select>
<option value="meter">Meter</option>
<option value="kilometer">Kilometer</option>
<option value="centimeter">Centimeter</option>
<option value="gram">Gram</option>
<option value="kilogram">Kilogram</option>
<option value="celsius">Celsius</option>
<option value="fahrenheit">Fahrenheit</option>
</select>
</form>
<?php
if (isset($_POST['submit'])) {
$value = $_POST['value'];
$from_unit = $_POST['from_unit'];
$to_unit = $_POST['to_unit'];
17
$converted_value = convertMeasurement($value, $from_unit, $to_unit);
?>
</div>
</body>
</html>
<?php
// Length conversion
// Weight conversion
// Temperature conversion
if ($from_unit == "meter") {
if ($to_unit == "kilometer") {
if ($to_unit == "meter") {
if ($to_unit == "meter") {
}
19
}
if ($from_unit == "gram") {
if ($to_unit == "kilogram") {
if ($to_unit == "gram") {
if ($from_unit == "celsius") {
if ($to_unit == "fahrenheit") {
}
20
} elseif ($from_unit == "fahrenheit") {
if ($to_unit == "celsius") {
?>
body {
background-color: #f4f4f9;
margin: 0;
padding: 0;
.container {
width: 50%;
margin: 0 auto;
padding: 20px;
background-color: white;
border-radius: 8px;
21
h1 {
text-align: center;
color: #333;
form {
display: flex;
flex-direction: column;
gap: 15px;
label {
font-weight: bold;
padding: 10px;
font-size: 16px;
border-radius: 5px;
button {
background-color: #28a745;
color: white;
cursor: pointer;
22
border: none;
button:hover {
background-color: #218838;
h2 {
text-align: center;
color: #333;
margin-top: 20px;
23
Output Of The Code
24
Conclusion
The Measurement Converter Microproject serves as a practical, reliable, and
efficient solution for converting units of measurement in various fields. By providing a
simple interface and instant results, this tool offers both beginners and professionals an
easy way to handle unit conversions. The project not only demonstrates the usefulness
of programming in solving real-world problems but also emphasizes the importance of
accuracy and user-centered design in creating functional applications.
This microproject lays the foundation for further enhancements, such as adding
support for more complex conversions, expanding categories, or integrating additional
features like currency conversion and multi-unit conversions. It is a versatile tool that
can grow and adapt to meet the diverse needs of its users.
25
Reference Links
https://chatgpt.com/c/67f0f68f-2d74-8002-beec-6dabad0ccfb8
https://www.scribd.com/document/510030251/Php-measurement-
converter-project
https://in.pinterest.com/pin/445082375678884810/
https://code-projects.org/measurement-conversion-in-php-with-source-
code/
26