Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Samarth Polytechnic,Belhe

DEPARTMENT OF COMPUTER ENGINEERING

Subject: Web Based application development using PHP. Subject code: 22619

Semester: 6th Course: Computer Engineering


Name of Subject Teacher: Prof. Kshirsagar. S. B Laboratory No:L001B
Name of Student: Jadhav Shekhar Dattatray Enrollment no: 2009920231
Date of Performance : / / 2022 Date of Submission: / / 2022

Experiment No: 11

Title of Experiment: Design a web page using following form


controls: a. List box, b. Combo box, c. Hidden
field box

Theory:
1.0 Title:
Design a web page using following form controls: a. List box, b. Combo box, c. Hidden field box

2.0 Practical Significance:

In this practical we will learn how to design a web page using different controls.

3.0 Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic mathematics, sciences and basic engineering to solve the
computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to solve the computer group related
problems.
 Experiments and practices: Plan to perform experiments and practices to use the result to solve the
computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools with an understanding
of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member in
diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

4.0 Apparatus:

Sr.No. Equipment Name with broad specification Practical


1 Hardware : any computer system (preferably i3 or i5) All
2 Operating System: Windows/Linux All
3 Any Database tool such as MYSQL,MariaDB 15,16

5.0 Minimum Theoretical Background:-

a) List box:
A text input field allows a user to enter a single line of text.
Program-
<html>
<head>
<title>List Box</title>
</head>
<body>
<form action="" method="post">
<select name="foods[]" size="3">
<option value="Tomatoes">Tomatoes</option>
<option value="Cucumbers">Cucumbers</option>
<option value="Celery">Celery</option>
</select><br>
<input type="submit" name="submit" value="Submit"/>
</form>
<?php
$c= $_POST['foods'];
if(isset($c))
{
echo 'You have chosen ';
foreach($c as $key => $value)
{
echo $value;
}
}
else
{
echo "You haven't selected any foods";
}
?>
</body>
</html>

Output-

b) Combo box:
Radio buttons let a user select only one of a limited number of choices:
Program-
<html>
<head>
<title>Combo Box</title>
</head>
<body>
<form action="" method="post">
<select name="foods[]">
<option value="Mango">Mango</option>
<option value="Banana">Banana</option>
<option value="Watermelon">Watermelon</option>
<option value="Grapes">Grapes</option>
</select><br>
<input type="submit" name="submit" value="Submit"/>
</form>
<?php
$c= $_POST['foods'];
if(isset($c))
{
echo 'You have chosen ';
foreach($c as $key => $value)
{
echo $value;
}
}
else
{
echo "You haven't selected any fruit";
}
?>
</body>
</html>

Output-

c) Hidden field box:


A hidden field is not displayed on the page. It simply stores the text value specified in the value
attribute.
Hidden fields are great for passing additional information from the form to the server.
Syntax:
<input type="hidden" name="hiddenField" id="hiddenField" value="" />
Program:-
<html>
<head>
<title>using hidden controls</title>
</head>
<body>
<center><h1>using hidden controls</h1>
<form method="post" action="phphidden.php">
click the button to see the hidden data.
<input name="hidden" type="hidden" value="no worries."><br>
<input type="submit" value="click me">
</form>
</center>
</body>
</html>

Output-

Process Product Total Dated Sign Of


Related Related (25 M) Teacher
Grade and (15M) (10M)
Dated Signature of
Teacher

You might also like