Professional Documents
Culture Documents
PHP Microproject
PHP Microproject
A
Micro Project Report
On
“ART GALLERY”
Submitted by
Siddhesh Jagdish Shelar Roll No: 12
Jainul Jignesh Dave Roll No: 01
Shreyash Kiran Dahale Roll No: 08
Ojas Yogesh Joshi Roll No: 57
P
In the Partial Fulfilment of Sixth Semester of Diploma in
AP
Computer Engineering
n
tio
lu
So
E
Sandip Polytechnic
SB
Affiliated to
Maharashtra State
Board of Technical Education
Maharashtra State
Board of Technical Education
Certificate
P
This is to certify that Mr. Siddhesh Jagdish Shelar. with Roll No-12 has successfully completed Micro-
project in course “Computer Engineering ” for the academic year 2020-21 as prescribed in the 'Assessment
AP
Manual' during his/her tenure of completing Sixth Semester of Diploma Program in Computer Engineering
from institute, Sandip Polytechnic with institute code 1167. n
tio
lu
Maharashtra State
Board of Technical Education
Certificate
P
This is to certify that Mr. Jainul Jignesh Dave with Roll No-01 has successfully completed Micro-project in
course “Computer Engineering ” for the academic year 2020-21 as prescribed in the 'Assessment Manual'
AP
during his/her tenure of completing Sixth Semester of Diploma Program in Computer Engineering from
institute, Sandip Polytechnic with institute code 1167. n
tio
lu
Maharashtra State
Board of Technical Education
Certificate
P
This is to certify that Mr. Shreyash Kiran Dahale . with Roll No-08 has successfully completed Micro-
project in course “Computer Engineering ” for the academic year 2020-21 as prescribed in the 'Assessment
AP
Manual' during his/her tenure of completing Sixth Semester of Diploma Program in Computer Engineering
from institute, Sandip Polytechnic with institute code 1167. n
tio
lu
Maharashtra State
Board of Technical Education
Certificate
P
AP
This is to certify that Mr. Ojas Yogesh Joshi. with Roll No-57 has successfully completed Micro- project in
course “Computer Engineering ” for the academic year 2020-21 as prescribed in the 'Assessment Manual'
n
during his/her tenure of completing Sixth Semester of Diploma Program in Computer Engineering from
tio
institute, Sandip Polytechnic with institute code 1167.
lu
So
An art gallery exhibits the works of many artists. Each artist is given a specified space on the online webpage.
The artists are charged for the space allotted to them on daily basis. The charges vary in different months. Jan to
April and August to December the charges are Rs 200 per day per exhibit, from May to July charges are Rs 300
per day per exhibit. Each exhibit has a name and style of painting. The exhibits can be bought by the online
customers who need to register with the art gallery. The painting is sent to the customer, when customer orders
painting. The system keeps track of the status of delivery of the painting to the customer. This status can also be
seen by the customer.
P
1.0 Rationale
The restaurant management system is a java project developed for taking and managing the restaurant orders.
AP
It assists the waiters to take the order of food digitally and more easily than before. This whole project is
developed in Java programming language using Netbeans IDE 8.2. Here in this project, you can add your
employee and also can add the menu items to make your restaurant look fancier. This project comes along
n
with MySQL database as backend.
tio
2.0 Aim /Benefits of Micro-Project:
lu
P
AP
n
tio
lu
So
T E
SB
M
Code :
1. Login Page
<html>
<head>
<title>Login</title>
<style>
body{
margin-top: 100px;
margin-bottom: 100px;
margin-right: 150px;
P
margin-left: 80px;
background-color: azure ;
AP
color: palevioletred;
font-family: verdana;
font-size: 100% n
tio
}
h1 {
lu
color: indigo;
font-family: verdana;
So
font-size: 100%; }
h3 {
color: indigo;
E
font-family: verdana;
T
font-size: 100%;
} </style>
SB
</head>
<body>
M
$numrows=mysqli_num_rows($query);
if($numrows!=0)
{
while($row=mysqli_fetch_assoc($query))
{
$dbusername=$row['name'];
$dbpassword=$row['password'];
}
/* Redirect browser */
header("Location: cart.php");
}
P
} else {
echo "Invalid username or password!";
AP
} } else {
echo "All fields are required!"; }
} ?> n
</body>
tio
</html>
lu
2. Registration Page
So
<html>
<head>
<title>Register</title>
E
<style>
T
body{
SB
margin-top: 100px;
margin-bottom: 100px;
margin-right: 150px;
M
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> Downloaded From MSBTE Solution App
MSBTE Solution App
<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>
<td>NAME:</td>
<td><input type=text name=user size=30></td>
</tr>
<tr>
<td>CONTACT:</td>
<td><input type=text name=contact size=30></td>
</tr>
P
<tr>
<td>E-MAIL:</td>
AP
<td><input type=email name=email size=30></td>
</tr>
<tr> n
<td>CITY:</td>
tio
<td><input type=text name=city size=30></td>
</tr>
lu
<tr>
<td>PASSWORD:</td>
So
darkblue"></td>
</tr>
M
</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");
$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.";
P
}
AP
} else {
echo "All fields are required!";
} n
}
tio
?>
</body>
lu
</html>
So
3. Cart Page
<?php
session_start();
E
$tot=0;
if(isset($_POST["add_to_cart"]))
SB
{
if(isset($_SESSION["shopping_cart"]))
M
{
$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"]
);
$_SESSION["shopping_cart"][$count] = $item_array;
}else{
echo '<script>alert("Item Already Added")</script>';}
}else{
$item_array = array(
'item_id' => $_GET["id"],
'item_name' => $_POST["hidden_name"],
'item_price' => $_POST["hidden_price"],
Downloaded From MSBTE Solution App
MSBTE Solution App
if(isset($_GET["action"]))
{if($_GET["action"] == "delete") {
foreach($_SESSION["shopping_cart"] as $keys => $values)
{if($values["item_id"] == $_GET["id"])
{
unset($_SESSION["shopping_cart"][$keys]);
echo '<script>alert("Item Removed")</script>';
//echo '<script>window.location="cart.php"</script>';
}} }}
if(isset($_POST["submit"]))
{
header("Location:bill.php");
P
}
?>
AP
<html><head></head><body>
<h2>Welcome, <?=$_SESSION['sess_user'];?>! <a href="logout.php">Logout</a></h2>
<br/><br/><br/><br/> n
<h3 align="center"><title="Online Art Gallery">Online Art Gallery</h3><br /><br/><br />
tio
<?php
$query = "SELECT * FROM tbl_product ORDER BY id ASC";
lu
{
while($row = mysqli_fetch_array($result))
{
E
?>
T
<div class="col-md-4">
<form method="post" action="cart.php?action=add&id=<?php echo $row["id"]; ?>">
SB
<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)
P
{
?>
AP
<tr>
<td><?php echo $values["item_name"]; ?></td>
<td><?php echo $values["item_quantity"]; ?></td>
n
<td><?php echo $values["item_price"]; ?></td>
tio
<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"]; ?>"><span class="text-
lu
danger">Remove</span></a></td></tr>
<?php
So
?>
T
<tr>
<td colspan="3" align="right">Total</td>
SB
<?php
?>
</table><form method="post"><input type="submit" value="Proceed to Checkout"
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'];
Downloaded From MSBTE Solution App
MSBTE Solution App
} }
$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;
P
font-family: verdana;
AP
font-size: 100%;
}
h2 { n
color: indigo;
tio
font-family: verdana;
font-size: 100%;
lu
}</style>
</head>
So
<body>
<form action="" method="POST">
<table border="1px" cellpadding="5px" align="center" style="color: black; text-align: center;
E
background-color: lightgrey"><br/>
T
<tr>
<td>NAME:</td>
SB
<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>
Downloaded From MSBTE Solution App
MSBTE Solution App
<?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 @";
P
$mail->setFrom('[email protected]');
$mail->addAddress($e);
AP
$mail->IsHTML(true);
<table style='width:600px;'>
<tbody>
So
<tr>
<td style='width:150px'><strong>Name: </strong></td>
<td style='width:400px'>$n</td>
E
</tr>
T
<tr>
<td style='width:150px'><strong>Email ID: </strong></td>
SB
<td style='width:400px'>$e</td>
</tr>
M
<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>
Downloaded From MSBTE Solution App
MSBTE Solution App
</html>
";
if(!$mail->send())
{
echo "ERROR: ".$mail->ErrorInfo;
}
else
{
P
}}
AP
?>
n
tio
lu
So
T E
SB
M
Output :
P
AP
n
tio
lu
P
AP
Fig 3: Online Art Gallery
n
tio
lu
So
T E
SB
M
P
AP
Fig 5: Billing Details
n
tio
lu
So
T E
SB
M
Applications
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.
Conclusion:
With the help of the project we learned different new concept of PHP. We got knowledge about different built
P
in features available in PHP. We learnt how to implement online art gallery system, how to establish
communication between server and host system.
AP
References:
1.
n
https://projectworlds.in/free-projects/php-projects/online-art-gallery-project-on-php/
tio
2. https://www.kashipara.com/project/php/2875/art-gallery-managemet
3. https://www.freeprojectz.com/php-mysql-project/art-gallery-management-system
lu
4. https://www.freestudentprojects.com/java-projects/online-art-gallery/
So
5. https://sourceforge.net/directory/os:windows/?q=online+art+gallery
T E
SB
M
P
AP
6. 6th Editing and proof Reading of Content
9th
So
Sr
Name of Resource/Material Specification Qty. Remarks
No
Desktop with Intel Core 2 Duo 2.93 -
1 Hardware Resource 1
GHz, RAM 2GB, HDD 160 GB
2 Software Resource Xampp, Notepad++ 1 -
3 Any Other Resource HP Laserjet,A4 sized 1 -
P
AP
Jainul Jignesh Dave
01
Shreyash Kiran Dahale
08
57
n
Ojas Yogesh Joshi
tio
lu
So
T E
SB
M
Prof.R.A.Kautkar
Name & Signature of Course Teacher
Annexure – IV
Course Title: Web Based Application Development with PHP Course Code: 22619
P
5. Perform database operations in PHP.
Poor Average Good Excellent
AP
Sr Sub
Characteristic to be Assessed Marks Marks Marks Marks
No Total
(1-3) (4-5) (6-8) (9-10)
(A) Process and Product Assessment (6 Marks)
n
1 Relevance to the Course
tio
2 Literature Review/Information C-ollection
lu
6 Report Preparation
SB
8 Viva
(A) (B)
Total Marks
Process and Product Assessment Individual Presentation/Viva
(10 Marks)
(6 Marks) (4 Marks)
P
Sr Sub
Characteristic to be Assessed Marks Marks Marks Marks
No Total
AP
(1-3) (4-5) (6-8) (9-10)
(A) Process and Product Assessment (6 Marks)
1 Relevance to the Course n
2 Literature Review/Information Collection
tio
3 Completion of the Target as per Project Proposal
lu
5 Quality of Prototype/Model
6 Report Preparation
E
7 Presentation
8 Viva
M
(A) (B)
Total Marks
Process and Product Assessment Individual Presentation/Viva
(10 Marks)
(6 Marks) (4 Marks)
P
Poor Average Good Excellent
Sr Sub
AP
Characteristic to be Assessed Marks Marks Marks Marks
No Total
(1-3) (4-5) (6-8) (9-10)
(A) Process and Product Assessment (6 Marks)
1 Relevance to the Course
n
tio
2 Literature Review/Information Collection
lu
6 Report Preparation
T
7 Presentation
M
8 Viva
(A) (B)
Total Marks
Process and Product Assessment Individual Presentation/Viva
(10 Marks)
(6 Marks) (4 Marks)
P
Poor Average Good Excellent
Sr Sub
AP
Characteristic to be Assessed Marks Marks Marks Marks
No Total
(1-3) (4-5) (6-8) (9-10)
(A) Process and Product Assessment (6 Marks)
1 Relevance to the Course
n
tio
2 Literature Review/Information Collection
lu
6 Report Preparation
T
7 Presentation
8 Viva
M
(A) (B)
Total Marks
Process and Product Assessment Individual Presentation/Viva
(10 Marks)
(6 Marks) (4 Marks)