0% found this document useful (0 votes)
33 views

PHP Project New Format

Uploaded by

karangrajput7028
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

PHP Project New Format

Uploaded by

karangrajput7028
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

SHREEYASH PRATISHTHAN’S

SHREEYASH COLLEGE OF ENGINEERING AND TECHNOLOGY


(POLYTECHNIC), CHH. SAMBHAJINAGAR

MICRO-PROJECT REPORT

NAME OF DEPARTMENT:-DIPLOMA IN COMPUTER ENGINEERING


ACADEMIC YEAR:- 2023-24
SEMESTER:-6TH
COURSE NAME:- WEB BASED APPLICATION DEVELOPMENT USING PHP
COURSE CODE:-22619
MICRO-PROJECT TITLE:- ART GALLERY
PREPARED BY:-
1) DURGA AARAMSING RAJPUT EN. NO:- 2210920438

UNDER THE GUIDANCE OF:- Prof. P. D. TANGDE


MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION,
MUMBAI
CERTIFICATE

This is to certify that Mr./ Ms. DURGA ARAMSING RAJPUT of 6th Semester
of Diploma in Computer engineering of Institute Shreeyash college of
engineering and technology (Polytechnic), chh. Sambhaji Nagar has successfully
completed Micro-Project Work in Course of Engineering Department for the
academic year 2023-24 as prescribed in the I-Scheme Curriculum.

Date:- / / 2024 Enrollment No:- 2210920438


Place:- Chh.Sambhaji Nagar Exam Seat No: -------------------

Signature Signature Signature


Guide HOD Principal

Seal of Institute
ACKNOWLEDGEMENT

We wish to express our profound gratitude to our guide Prof.


Prof. P. D. Tangde who guided us endlessly in framing and completion of Micro-
Project. He / She guided us on all the main points in that Micro-Project. We are
indebted to his / her constant encouragement, cooperation and help. It was his /
her enthusiastic support that helped us in overcoming of various obstacles in the
Micro-Project.
We are also thankful to our Principal, HOD, Faculty Members
and classmates for extending their support and motivation in the completion of
this Micro-Project.

1) DURGA AARAMSING RAJPUT EN. NO:- 2210920438


Annexure-1
Micro-Project Proposal

Title of Micro-Project: - Art Gallery

1.0 Aims/Benefits of the Micro-Project


1. To make art gallery available virtually
2. Helps to make user order creative art online.

2.0 Course Outcomes Addressed


a) Develop program using control statement. (CO605.1)
b) Perform operations based on arrays and graphics. (CO605.2)
c) Use form controls with validation to collect user’s input. (CO605.4)
d) Perform database operations in PHP. (CO605.5)

3.0 Proposed Methodology


 In this micro project, first of all we have focused on selection of
appropriate topic for the micro-project.
 We have decided our topic i.e. “Art Gallery”
 Then we did literature survey on our topic and gained knowledge about
existing and proposed system.
 Then we gathered all information based on the topic of micro-project.
 We executed our code.
 We have done analysis and study of our topic in detail.
 By doing all the above methodologies we have successfully done our
micro project.
Annexure-1

4.0 Action Plan


Name of
Sr. Planned Planned Responsible
Details of activity
No. Week Start Finish Team
date date Members
1 1 &2 Discussion & Finalization of
Topic
2 3 Preparation of the Abstract
3 4 Literature Review
4 5 Submission of Microproject
Proposal ( Annexure-I)
5 6 Collection of information about
Topic
6 7 Collection of relevant content /
materials for the execution of
Microproject. Durga
7 8 Discussion and submission of Aaramsing
outline of the Microproject. Rajput
8 9 Analysis / execution of
Collected data / information and
preparation of Prototypes /
drawings / photos / charts /
graphs / tables / circuits /
Models / programs etc.
9 10 Completion of Contents of
Project Report
10 11 Completion of Weekly progress
Report
11 12 Completion of Project Report (
Annexure-II)
12 13 Viva voce / Delivery of
Presentation

5.0 Resources Required

Sr. Name of Resources / Specification Qty Remarks


No. Materials
1 Hardware Resource Desktop with Intel Core 2 Duo
2.93 GHz, RAM 2GB, HDD160 1
GB
2 Software Resource -Xampp, Notepad++ 1
3 Any Other Resource Internet, HP Laserjet,A4 sized 1

Names of Team Members with En. Nos.

1. DURGA AARAMSING RAJPUT EN. NO:- 2210920438


Annexure-II
Micro-Project Report

Title of Micro-Project:- Art Gallery

1.0 Rationale:-
The art gallery is where the arts or art crafts of the artists can be
displayed for the visitors’ view. People additionally comment on arts that artist’s
show so that there will be some scope of improvement of the arts that is displayed.
Online Art gallery project However, these days because of the busy schedule of the
people, they don’t have time schedule-wise to visit the art gallery to view the
paintings of the famous artist. Online Art gallery project Yet, imagine a scenario
where the artist display is available on the online Indeed, it is conceivable. The
online art gallery is the application that enables the clients to transfer their paintings
and make it available to the visitors’ view.

2.0 Aims/Benefits of the Micro-Project:-


1. To make art gallery available virtually
2. Helps to make user order creative art online.

3.0 Course Outcomes Achieved


1. Develop program using control statement. (CO605.1)
2. Perform operations based on arrays and graphics. (CO605.2)
3. Use form controls with validation to collect user’s input. (CO605.4)
4. Perform database operations in PHP. (CO605.5)

4.0 Literature Review:-


 In today’s world where mankind is moving towards automation to
increase the efficiency of their work, there should be system to motivate
artists to make better art. People nowadays hardly want to move from their
places for shopping and not even for eating this is because of their hectic
schedule. In such circumstances, we have decided to create a system for
online purchase of arts.
 The existing traditional system of art gallery has large number of
drawbacks such as time consuming procedure, formation of crowd in
malls, problem of bargaining, etc. This problems waste time of customers
and manpower of artist and also de-motivates them. Hence to overcome
this problem the decided to introduce Online Art Gallery.
5.0 Actual Methodology Followed
5.1 Step wise work done:
1. In this micro project, first of all we have focused on selection of appropriate
topic for the micro-project.
2. We have decided our topic i.e. “Art Gallery”
3. Then we did literature survey on our topic and gained knowledge about existing
and proposed system.
4. Then we gathered all information based on the topic of micro-project.
5. We executed our code.
6. We have done analysis and study of our topic in detail.
7. By doing all the above methodologies we have successfully done our micro
project.
Code :

1. Login Page

<html>
<head>
<title>Login</title>
<style>
body{

margin-top:
100px; margin-
bottom: 100px;
margin-right:
150px; margin-
left: 80px;
background-color:
azure ;color:
palevioletred;
font-family:
verdana;font-
size: 100%

}
h
1{
color:
indig
o;
font-family:
verdana;font-
size: 100%; }
h3 {
color: indigo;
font-family:
verdana;font-
size: 100%;
} </style>
</head>
<body>
<center><h1>WELCOME TO ONLINE ART GALLERY</h1></center>
<p><a href="register.php">Register</a> | <a href="login.php">Login</a></p>
<center><h3>Login Form</h3> </center>
<form action="" method="POST">
<legend><fieldset><center>
Username: <input type="text" name="user"><br><br>
Password: <input type="password"
name="pass"><br><br>
<input type="submit" value="Login" name="submit" onclick="cart.php"style="background-
color:lightblue; color: darkblue" >
</center></fieldset></legend></form>
<?php
if(isset($_POST["submit
"])){
if(!empty($_POST['user']) && !empty($_POST['pass'])) {
$user=$_POST['user'];
$pass=$_POST['pass'];
$con=mysqli_connect('localhost','root','','product2') or die(mysql_error());
//mysqli_select_db('product2',$con) or die("cannot select DB");
$query=mysqli_query($con,"SELECT * FROM user WHERE name='".$user."'AND
password='".
$pass."'");

$numrows=mysqli_num_rows($quer
y);if($numrows!=0)
{
while($row=mysqli_fetch_assoc($query))
{
$dbusername=$row['name'];
$dbpassword=$row['password'];
}

if($user == $dbusername && $pass == $dbpassword)


{
session_start();
$_SESSION['sess_user']=$user;

/* Redirect browser */
header("Location:
cart.php");
}
} else {
echo "Invalid username or password!";
} } else {
echo "All fields are required!"; }
} ?>
</body>
</html>
2. Registration Page

<html>
<head>
<title>Register</title>
<style>
body{
margin-top: 100px;
margin-bottom: 100px;
margin-right: 150px;
margin-left: 80px;
background-color: azure ;
color: palevioletred;
font-family: verdana;
font-size: 100%

}
h1 {
color: indigo;
font-family: verdana;
font-size: 100%;
}
h2 {
color: indigo;
font-family: verdana;
font-size: 100%;
}</style>
</head>
<body>
<p><a href="register.php">Register</a> | <a href="login.php">Login</a></p>

<center><h2>Registration Form</h2></center>
<form action="" method="POST">

<legend>
<fieldset>
<table border="1px" cellpadding="5px" align="center" style="color: black; text-align: center; background-
color: lightgrey"><br/>
<tr>

</tr>
<tr>

</tr>
<tr>

</tr>
<tr>

</tr>
<tr>

</tr>
<tr>

<td>NAME:</td>
<td><input type=text name=user size=30></td>

<td>CONTACT:</td>
<td><input type=text name=contact size=30></td>

<td>E-MAIL:</td>
<td><input type=email name=email size=30></td>

<td>CITY:</td>
<td><input type=text name=city size=30></td>

<td>PASSWORD:</td>
<td><input type=password name=pass size=30></td>

<td><input type=submitvalue="REGISTER"name="submit" style="background-color:


white; color: darkblue"></td>
<td><inputtype=resetstyle="background-color:white; color:
darkblue"></td>
</tr>
</table>
</fieldset>
</legend>
</form>
<?php
if(isset($_POST["submit"])){
if(!empty($_POST['user']) && !empty($_POST['contact']) && !empty($_POST['email']) && !
empty($_POST['city']) && !empty($_POST['pass']) ) {
$user=$_POST['user'];
$num=$_POST['contact'];
$email=$_POST['email'];
$city=$_POST['city'];
$pass=$_POST['pass'];
$con=mysqli_connect('localhost','root','','product2') or die(mysql_error());
//mysqli_select_db('user_registration') or die("cannot select DB");

$query=mysqli_query($con,"SELECT * FROM user WHERE name='".$user."'");


$numrows=mysqli_num_rows($query);
if($numrows==0)
{

$sql="INSERT INTO user(name,contact,email,city,password)


VALUES('$user','$num','$email','$city','$pass')";

$result=mysqli_query($con,$sql);

if($result){
echo "Account Successfully Created";
} else {
echo "Failure!";
}

} else {
echo "That username already exists! Please try again with another.";
}

} else {
echo "All fields are required!";
}
}
?>
</body>
</html>
3. Cart Page
<?php
session_start();
$connect = mysqli_connect("localhost", "root", "", "product2");
$tot=0;
if(isset($_POST["add_to_cart"]))
{
if(isset($_SESSION["shopping_cart"]))
{
$item_array_id = array_column($_SESSION["shopping_cart"], "item_id");
if(!in_array($_GET["id"], $item_array_id))
{
$count = count($_SESSION["shopping_cart"]);
$item_array = array(
'item_id' => $_GET["id"],
'item_name' => $_POST["hidden_name"],
'item_price' => $_POST["hidden_price"],
'item_quantity' => $_POST["quantity"]

else{

);
$_SESSION["shopping_cart"]

[$count] = $item_array;

echo '<script>alert(

"Item Already Added")</script>';}

?>
<div class="col-md-4">
<form method="post" action="cart.php?action=add&id=
<?php echo $row["id"]; ?>">
<div style="border:1px
solid #555;
background-color:#f2f2f2;border-radius:5px;
padding:16px;"align="center"
<imgsrc="images/<?phpcho$row["image"];?>"
class="img-responsive"width="200"height="200"/><br />

control" />
echo $row["name"]; ?>" />
<h4><?php echo $row["name"]; ?></h4>
<h4><?php echo $row["price"]; ?></h4>
<input type="text" name="quantity"
value="1" class="form-
<input type="hidden" name="hidden_name" value="<?php

<input type="hidden" name="hidden_price" value="<?php


echo $row["price"]; ?>" /<input type="submit" name="add_to_cart" style="margin-top:5px;" class="btn btn-
success" value="Add to Cart" />
</div></form></div><?php}}
?>
<div style="clear:both"></div><br />
<h3>Order Details</h3>
<div class="table-responsive">
<div style="border:1px solid #555; background-color:#f2f2f2; border-radius:5px; padding:16px;"
align="center"> <table class="table table-bordered" <tr>
<th>Item Name</th>
<th>Quantity</th>
<th>Price</th>
<th>Total</th>
<th>Action</th>
</tr>
<?php
if(!empty($_SESSION["shopping_cart"]))
{

$total = 0; foreach($_SESSION["shopping_cart"] as $keys => $values)


{
?>
<tr>
<td><?php echo $values["item_name"]; ?></td>
<td><?php echo $values["item_quantity"]; ?></td>
<td><?php echo $values["item_price"]; ?></td>
<td><?php echo number_format($values["item_quantity"] * $values["item_price"], 2);?></td>
<td><a href="cart.php?action=delete&id=<?php echo$values["item_id"];?>">
<spanclass="text-danger">Remove</span></a></td></tr>
<?php
$total = $total + ($values["item_quantity"] * $values["item_price"]);
$_SESSION["tot"]=$total;
}
?>
<tr>
<td colspan="3" align="right">Total</td>
<td align="right"> <?php echo number_format($total, 2); ?></td>
</tr>
<?php
?>
</table><formmethod="post"><inputtype="submit"value="ProceedtoCheckout"
name="submit"></form></div></div></div></body></html>
4. Billing page
<?php
session_start();
$connect = mysqli_connect("localhost", "root", "", "product2");
$query=mysqli_query($connect,"SELECT * FROM user WHERE name='".$_SESSION['sess_user']."'");
$numrows=mysqli_num_rows($query);
$name=$num=$em=$city=" ";
if($numrows!=0)
{
while($row=mysqli_fetch_assoc($query)) {
$name=$row['name'];
$num=$row['contact'];
$em=$row['email'];
$city=$row['city'];
} }
$total=$_SESSION['tot'];
?>
<html> <head> <title>Bill</title> <style>
Body
{
margin-top: 100px;
margin-bottom: 100px;
margin-right: 150px;
margin-left: 80px;
background-color: azure ;
color: palevioletred;
font-family: verdana;
font-size: 100% }
h1 {
color: indigo;

font-family: verdana;
font-size: 100%;
}
h2 {
color: indigo;
font-family: verdana;
font-size: 100%;
}</style>
</head>
<body>
<form action="" method="POST">
<table border="1px" cellpadding="5px"align="center"style="color:black; text-align:center;
background-color: lightgrey"><br/>
<tr>
<td>NAME:</td>
<td><input type=text name=user size=30 value=<?php echo $name;?> ></td </tr>
<tr>
<td>CONTACT:</td>
<td><input type=text name=contact size=30 value=<?php echo $num;?>></td>
</tr>
<tr>
<td>E-MAIL:</td>
<td><input type=email name=email size=30 value=<?php echo $em;?>></td></tr><tr>
<td>CITY:</td>
<td><input type=text name=city size=30 value=<?php echo $city;?>></td></tr>
<tr><td>Total Amount:</td>
<td><?php echo "Rs.".$_SESSION['tot'];?></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Confirm Order" name="submit"></td>
</tr></table></form></body></html>
<?php
if(isset($_POST["submit"]))
{
$n=$_POST["user"];
$c=$_POST["contact"];
$e=$_POST["email"];
$ci=$_POST["city"];

require_once('C:\xampp\lib\class.phpmailer.php');
require_once('C:\xampp\lib\class.smtp.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = "smtp.gmail.com";
$mail->Port = 25;
$mail->Username ="[email protected]";
$mail->Password ="asmeeta2001 @";
$mail->setFrom('[email protected]');
$mail->addAddress($e);
$mail->IsHTML(true);

$mail->Subject='Your order has been placed successfully.';


$mail->Body = "
<html>
<body>
<table style='width:600px;'>
<tbody>
<tr>
<td style='width:150px'><strong>Name: </strong></td>
<td style='width:400px'>$n</td>
</tr>
<tr>
<td style='width:150px'><strong>Email ID: </strong></td>
<td style='width:400px'>$e</td>
</tr>
<tr>
<td style='width:150px'><strong>Mobile No: </strong></td>
<td style='width:400px'>$c</td>
</tr>
<tr>
<td style='width:150px'><strong>Address: </strong></td>
<td style='width:400px'>$ci</td>
</tr>
<tr>
<td style='width:150px'><strong>Total Bill: </strong></td>
<td style='width:400px'>$total</td>
</tr>
<tr>
<td style='width:150px'><strong>Arrival Date: </strong></td>
<td style='width:400px'><strong>It will arrive in 2 to 3 days</strong></td>
</tr>
</tbody>
</table>
</body>
</html>
";
if(!$mail->send())
{
echo "ERROR: ".$mail->ErrorInfo;
}
else
{

$connect = mysqli_connect("localhost", "root", "", "product2");


$sql
"INSERTINTO
order_place(name,contact,email,city,total)VALUES('$n','$c','$e','$ci','$total')";
$retval = mysqli_query($connect, $sql);
if($retval ) {
//echo "New Record Inserted"; echo
"Order Successfully Placed";}
Else
echo "Error" .$sql."<br>".mysqli_error($connect);
}
}
6.0 Actual Resources Used:-

sr.
No. Name of Specifications Qty Remarks
Resource/material
Hardware Resource Desktop with Intel Core 2 -
1 Duo 1
2.93 GHz, RAM 2GB, HDD
160 GB
2 Software Resource -Xampp, Notepad++ 1 -

3 Any Other Resource Internet, HP Laserjet,A4 sized 1 -


7.0 Outputs of the Micro-Projects

Fig 1: Login Page

Fig 2: Registration Page


Fig 3: Online Art Gallery

Fig 4: Order Details


Fig 5: Billing Details

Fig 6: Order Confirmation Mail


8.0 Skill Developed/Learning outcome of this Micro-Project
1. Able to perform different operations using array and graphics.
2. Able to implement different kinds of control statements.
3. Able to perform form validation using user input.
4. Able to perform operation based on database and sent mail.

9.0 Applications of this Micro-Project:-


1. This project can be used by artist to introduce their art online and connect with
people.
2. Can be used by people to buy online art of their interest.
3. With the help of the project we learned different new concept of PHP. We got
knowledge about different built in features available in PHP.
4. We learnt how to implement online art gallery system, how to establish
communication between server and host system.
Annexure-IV
MICRO-PROJECT EVOLUTION SHEET

Name of Student:- DURGA AARAMSING RAJPUT En.No.2210920438


Name of Program:- DIPLOMA IN COMPUTER ENGINEERING Semester:- 6th
Course Name:- WEB BASED APPLICATION DEVELOPMENT USINGPHP Course Code:-22619
Title of The Micro-Project:- ART GALLERY
Course Outcomes Achieved:-
a) Develop program using control statement.
b) Perform operations based om arrays and garaphics.
c) Develop program bu applying various object oriented concepts.
d) Use form controls with validation to collect user’s input.
e) Perform database operations in PHP.

Sr. Poor Average Good Excellent Sub


Characteristic to be Total
No. assessed (Marks1-3) (Marks4-5) (Marks 6-8) (Marks9-10)
(A) Process and Product Assessment (Convert Below total marks out of 6Marks)
1 Relevance to the course
2 Literature
Review/information
collection
3 Completion of the Target
as Per project proposal
4 Analysis of Data and
representation
5
Quality of
Prototype/Model
6 Report Preparation
(B) Individual Presentation/Viva(Convert Below total marks out of 4Marks)
7 Presentation
8
Viva

(A) (B)
Process and Product Individual Presentation/ Total Marks
Assessment (6 marks) Viva (4 marks) 10

Comments/Suggestions about team work/leadership/inter-personal communication


__________________________________________________________________________________________
__________________________________________________________________________________________
_______________________________________________________________________________________

Name of Course Teacher:- Prof. P. D. Tangde


Dated Signature:-__________________

You might also like