0% found this document useful (0 votes)
19 views2 pages

pr11 (WBP)

The document presents a practical assignment for designing a web page using HTML and PHP, focusing on form controls such as a list box and a combo box. The HTML code includes two select elements for food and fruit choices, along with a submit button. The PHP code processes the form submission, displaying the selected items or a message if none were selected.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

pr11 (WBP)

The document presents a practical assignment for designing a web page using HTML and PHP, focusing on form controls such as a list box and a combo box. The HTML code includes two select elements for food and fruit choices, along with a submit button. The PHP code processes the form submission, displaying the selected items or a message if none were selected.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Name: Shreyas Liladhar Lokhande Roll No: 41

Class: TYCM Batch: B

Subject: WBP

Practical No & Name: 11. Design a web page using following form controls :
a. List Box
b. Combo Box

HTML Code:

<html>
<body>
<form method='post' action='pr11.php'>
<select name='foods[]' size='3'>
<option value='Tomato'>Tomato</option>
<option value='Cumcumber'>Cumcumber</option>
<option value='Celery'>Celery</option>
</select><br>
<select name="fruits[]">
<option value="Mango">Mango</option>
<option value="Banana">Banana</option>
<option value="Watermelon">Watermelon</option>
<option value="Graps">Graps</option>
</select>
<input type="submit" name="submit" value='Submit'/>
</form>
</body>
</html>

PHP Code:
<?php
$c=$_POST['foods'];
$f=$_POST['fruits'];
if(isset($c))
{
echo "You have choosen: ";
foreach($c as $value)
{
echo $value."<br>";
}
}
else
{
echo "You havent Selected yet";
}
if(isset($f))
{
echo "You have choosen: ";
foreach($f as $value)
{
echo $value;
}
}
else
{
echo "You havent Selected yet";
}
?>

Output :
You have choosen: Cumcumber
You have choosen: Mango

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy