Iet Lab
Iet Lab
TABLE OF CONTENTS
a. 3
College vision and mission statement
b. Department Vision, Mission, PEOs, POs, 4
PSOs
c. 7
Lab syllabus
d. List of Experiments Mapping with COs, POs 8
&PSOs
Lab Experiments
2
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
VISION
To develop students with intellectual curiosity and technical expertise to meet the global
needs.
MISSION
3
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
VISION
To cultivate a generation of globally competitive IT professionals who are equipped
with the knowledge, skills, and adaptability to flourish amidst technological
advancements.
MISSION
To achieve academic excellence in Information Technology by fostering a dynamic
learning environment that seamlessly integrates innovative computing methodologies into
the teaching and learning process.
Pursue lifelong learning, use cutting-edge technologies, and be involved in applied research
to design optimal solutions.
4
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
PROGRAM OUTCOMES
PO1: Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals,
and an engineering specialization to the solution of complex engineering problems.
PO2: Problem analysis: Identify, formulate, review research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences, and
engineering sciences.
PO3: Design / development of solutions: Design solutions for complex engineering problems and design
system components or processes that meet the specified needs with appropriate consideration for the public
health and safety, and the cultural, societal, and environmental considerations.
PO4: Conduct investigations of complex problems: Use research-based knowledge and research methods
including design of experiments, analysis and interpretation of data, and synthesis of the information to
provide valid conclusions
PO5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities with an
understanding of the limitations.
PO6: The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal,
health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice.
PO7: Environment and sustainability: Understand the impact of the professional engineering solutions in
societal and environmental contexts, and demonstrate the knowledge of, and need for sustainable
development.
PO8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of
the engineering practice.
PO9: Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.
PO10: Communication: Communicate effectively on complex engineering activities with the engineering
community and with society at large, such as, being able to comprehend and write effective reports and
design documentation, make effective presentations, and give and receive clear instructions.
PO11: Project management and finance: Demonstrate knowledge and understanding of the engineering
and management principles and apply these to one’s own work, as a member and leader in a team, to manage
projects and in multidisciplinary environments.
PO12: Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
5
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Have proficiency in programming skills to design, develop and apply appropriate techniques, to solve
complex engineering problems. Successfully carry forward domain knowledge in computing and
allied areas to solve complex and real-world engineering problems.
Have the knowledge to build, automate, and manage business solutions using cutting-edge
technologies.
6
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
LAB SYLLABUS
Course Objectives:
To comprehend and analyze the basic concepts of web programming and internet protocols.
To describe how the client-server model of Internet programming works.
To demonstrate the uses of scripting languages.
To write simple scripts for the creation of web sites.
To create database applications.
List of Experiments
1. Creation of interactive web sites – Design using HTML and authoring tools
ii. Session tracking using hidden form fields and Session tracking for a hit count
TOTAL: 30 PERIODS
7
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Course Outcomes
Course Knowledge
COs Course Outcomes Level
Code
After completion of the course,
The students will be able to apply JavaScript, HTML and CSS
CO1 C213.1 effectively to create interactive and dynamic websites. K3
CO2 C213.2 The students will be able to create simple PHP scripts K6
The students will be able to design and deploy simple web-applications.
CO3 C213.3 K6
The students will be able to create simple database applications.
CO4 C213.4 K6
The students will be able to handle multimedia components
CO5 C213.5 K3
Exp.
Name of the Experiment Cos POs PSOs
No.
Creation of interactive web sites – Design using
1. CO1 1,2,3,4,5,9,10,11 & 12 1,2 & 3
HTML and authoring tools
2. Form validation using JavaScript CO1 1,2,3,4,5,9,10,11 & 12 1,2 & 3
Creation of simple PHP scripts
3. CO2 1,2,3,4,5,9,10,11 & 12 1,2 & 3
Handling multimedia content in web sites
4. 1,2,3,4,5,9,10,11 & 12 1,2 & 3
CO3
Write programs using Servlets:
5. CO5 1,2,3,4,5,9,10,11 & 12 1,2 & 3
i. To invoke servlets from HTML forms
8
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Ex. No:1 CREATION OF INTERACTIVE WEB SITES - DESIGN USING HTML AND
Date: AUTHORING TOOLS
AIM:
To develop a website to enter the student profiles.
ALGORITHM:
Step1: Start the program.
Step 2: using html tags, create table to enter the student profile.
Step3: For each row of the table, enter the data using <td> such that create student name, fathers name,
address and e-mail, etc.
Step 4: Using<table> we have to enter the qualification of the students.
Step 5: Using radio button, we have to choose the entertainment and software exposure of the
student. Step 6: Using<form>, we have to create a declare text to type the text.
Step 7: Execute the web page in Internet explorer.
PROGRAM:
<html>
<head>
<title>Resume page</title>
</head>
<body bgcolor="#fffFF">
<center><font color="#6600CC"><h1><b><b><u>PROFILE</u></b></b></h1></center></font>
<form name="input" action="z:\WebTech Lab\webpageprofile.htm" method="get">
<img height=100 width=100 src="z:\WebTech Lab Photo.jpg" alt="angry face">
<table border="3">
<td>Name:</td>
<td><input type="text" height="10" width="25"></td>
</tr>
<tr>
9
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
<td>Father Name:</td>
<td><input type="text" height="10" width='25'></td></tr>
<tr>
<td>Mother Name:</td>
<td><input type="text" height="10" width="25"></td></tr>
<tr>
<td>Date of Birth:</td>
<td><input type="text" height="10" width="25"></td></tr>
<tr>
<td>Marital Status:</td>
<td><input type="text" height="10" width="25"></td></tr>
<tr>
<td>Communication:</td>
<td colspan="4"><textarea name="male" rows="4" cols='17></textarea></td></tr>
<tr>
<<td>Gender:</td>
<td>Male:<input type="checkbox" name="male">Female:<input type="checkbox “name="female""></td>
</tr>
<tr>
<thcolspan="6">Educational Qualifications</th></tr>
<tr>
<th>Name of the Deg.</th><th>name of the degree</th><th>Name of the Institution</th><th>Year of
Pass</th><th>Grade</th><th>Specialization</th></tr><tr>
<td>SSLC:</td>
<td><input type="text" height="10" width="25"></td>
<td><input type="text" height="10' width='25'></td>
10
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
11
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
<tr>
<td>M.E:</td>
<td><input type="text" height="10" width="25"></td>
<td><input type="text" height="10" width="25"></td>
<td><input type="text" height="10" width="25"></td>
<td><input type="text" height="10" width="25"></td>
<td><input type="text" height="10" width="25"></td>
</tr>
<br><br><br>
<tr>
<th colspan="6">Software Exposure</th>
</tr>
<tr>
<td>OS:</td>
<<td colspan="5">Windows XP/00/03
<input type="checkbox” name="male">LINUX
<input type="checkbox” name="female">UNIX
<input name="female">others
<input type="checkbox" name="female">
</td>
</tr>
<tr>
<td>Languages:</td>
<td colspan="5">C:<input type="checkbox" name="male">C++:<input type="checkbox"
name="female">Java:<input type="checkbox" name="female">J2EE <input type="checkbox"
name="female"></td></tr>
<tr>
12
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
RESULT:
Thus, the websites for student profile have been created and verified successfully.
13
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Ex. No:2
FORM VALIDATION USING JAVASCRIPT
Date:
AIM:
To develop a webpage for a registration form using Javascript
ALGORITHM:
Step1: Start the program
Step2: Define regular expressions for field validations and create a javascript function “validate” to handle form
validations.
Step 3: Retrieve form field values and initialize an empty “errors” array.
Step 4: Validate name, email, username, password, gender adding error messages to the array, is
validations fails.
Step 5: If the “errors” array is not empty then call the “reportErrors” function and in that function construct an
error message and display it using the “alert” function.
Step 6: If the “errors” array is empty then allow form submission and attach the “validate” function to the
form’s “onSubmit” event.
Step 7: Define an html form with input fields and close the form using the tags.
PROGRAM:
<html>
<head>
<title> Registration Form Tutorial</title>
<script type="text/javascript"></script>
<script type="text/javascript">
var ck_name = /^[A-Za-z0-9]{3.20}$/;
var ck_email= /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\)* \w[\w-]{0,66})\([a-z]{2,6})(?:\[a-z]{2})?)$/i var ck_username
= /^[A-Za-z0-9]{1.20)S/;
14
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
15
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
16
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
17
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
RESULT:
Thus, the program for Javascript for form validation is executed and verified successfu
18
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Ex. No:3
CREATION OF SIMPLE PHP SCRIPTS
Date:
AIM:
To create web page in PHP scripts that find the sum of two numbers.
ALGORITHM:
<html>
<head>
<title>Writing PHP Function with Parameters</title>
</head>
<body>
<?php
function addFunction($num1, $num2)
{
$sum = $num1 + $num2;
echo "Sum of the two numbers is : $sum";
}
addFunction(10, 20);
?>
</body>
</html>
RESULT:
The web page is created in PHP scripts and that find the sum of two numbers successfully.
19
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Ex. No:4
HANDLING MULTIMEDIA CONTENT IN WEB SITES
Date:
AIM:
ALGORITHM:
PROGRAM:
<!DOCTYPE html>
<html>
<body>
<embed src="india.jpg" width="200" height="200"></br>
<embed src="animation.swf" type="application/vnd.adobe.flash-movie"></br>
<audio controls>
<source src="kalimba.mp3" type="audio/mpeg"> Your browser does not support the audio element.
</audio>
</body>
</html>
20
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
<!DOCTYPE html>
<html>
<body>
<h1><center>HANDLING MULTIMEDIA CONTENT IN WEB SITES</center></h1>
<h2>Audio</h2>
<audio controls>
<source src="song.mp3" type="audio/mpeg">
</audio>
<h2>Video</h2>
<video width="420" height="250" controls>
<source src="video.mp4" type="video/mp4">
</center>
</video>
<h2>Youtube videos</h2>
<h3>Ex:2 Form validation using JavaScript</h3>
<iframe width="420" height="345" src="https://www.youtube.com/embed/1iaUWdVRABU">
</iframe>
<h3>Ex:5 Write programs using Servlets:</h3>
<iframe width="420" height="345" src="https://www.youtube.com/embed/9fjNuEfMOgU">
</iframe>
</body>
</html>
RESULT:
The webpage is created and that handles the multimedia content in web sites successfully.
21
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Ex. No:5(a)
INVOKE SERVLETS FROM HTML FORMS
Date:
AIM:
ALGORITHM:
Step 3: Get the response from the user by entering the username field.
Step 4: Get the response from the user by entering the password field.
Step 5: If the username and password are correct, then the user is authenticated and can enter into web page.
Step 6: Execute the program in Internet Explorer.
Step 7: Stop the program.
PROGRAM:
HTML Code:
<HTML>
<HEAD><CENTER></CENTER></HEAD>
<CENTER>
<body bgcolor="green">
<form action="http://localhost:7001/parthi_servlet/servlet1" method="get">
<h1>USERNAME AND PASSWORD></h1>
<TABLE>
<TR>
<TD>USERNAME<INPUT TYPE="TEXT" name="username"></TD></TR>
<TR>
<TD> PASSWORD<INPUT TYPE="password" name="password"></TD></TR>
<TR>
22
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
23
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Ex.No.:5(b)
SESSION TRACKING USING HIDDEN FORM FIELDS AND SESSION TRACKING FOR
Date:
A HIT COUNT
AIM:
ALGORITHM:
PROGRAM:
index.html
24
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
web.xml
<web-app...>
<servlet>
<servlet-name>First</servlet-name>
<servlet-class>First</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>First</servlet-name>
<url-pattern/First</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Second</servlet-name>
<servlet-class>Second</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Second</servlet-name>
<url-pattern>/Second</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
25
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
First.java
26
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Second.java
RESULT:
Thus, the servlet program has been created and validated successfully.
27
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Ex. No:6 CREATION OF INFORMATION RETRIEVAL SYSTEM USING WEB, PHP AND MYSQL
Date:
AIM:
ALGORITHM:
PROGRAM:
<?php session_start();
// connect to mysql
$con= mysqli_connect("localhost", "root", "", "feedback");
//In case of failure connection If(!$con)
{
die("Server could not connected");
}
if(isset($_POST["btn"]))
{
$name=$_POST["name"];
28
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
$feed=$_POST["feed"];
//mysql insert query
$sql="insert into data values(’’’.$name.’’’,’’’.$feed.’’’)";
$n=mysqli_query($con,$sql);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a
href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">
<html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/ 1999/xhtml</a>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Feedback | Ashok Kumar |</title>
<meta name="distribution" content="global" />
<meta name="language" content="En" />
</head>
<script>
// function for creating alert after submission of feedback function check()
{
alert(‘Thank you for your feedback.’);
}
</script>
<div class="container">
<form id="contact" action="" method="post">
<h3>Feedback Form</h3>
29
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
<h4>"The key to learning is feedback. It is nearly impossible to learn anything without it"</h4>
<fieldset>
<input placeholder = "Your name" type="text" name="name" tabindex="1" required autofocus>
</fieldset>
<fieldset>
<textarea placeholder="Write Something about me.." name="feed"tabindex="5"
requiredautofocus></textarea>
</fieldset>
<fieldset>
<input type="submit" name="btn" value="Submit" onclick="check()">
</fieldset>
</form>
</div>
Create the database, and then create the table for data.
Enter the rows in the table. You have to connect to the database. Now we understand each and every step
as shown below.
Example 1: In this. We use PHPMyAdmin for the database handling. Start the server in the XAMPP as shown
in the below image
Making sure that both Apache and MySQL are showing green color, means that the server is working.
XAMPP PANEL
After that create the database in the PHPMyAdmin. Open the below URL.
http://localhost/phpmyadmin/index.php
CREATE TABLE student (name varchar (20),
branch varchar (20), roll_no INT);
30
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
PHP Code: Run the PHP script as shown below to fetch the data from the database.
PHP
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname="gfg":
// connect the database with the server
$conn = new mysqli($servername, $username, $password,$dbname);
// if error occurs
if ($conn->connect_errno)
{
echo "Failed to connect to MySQL:".$conn->connect_error; exit();
}
$sql = "select * from student";
$result = ($conn->query($sql));
//declare array to store the data of database
$row = [];
if ($result->num_rows > 0)
{
// fetch all data from db into array
$row=$result->fetch_all(MYSQLI_ASSOC);
}
?>
31
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
<!DOCTYPE html>
<html>
<style> td,th{
border: 1px solid black; padding:
10px; margin: 5px;
text-align: center;
}
</style>
<body>
<table>
<thead>
<tr>
<th>Name</th>
<th>Branch</th>
<th>Roll Number</th>
</tr>
</thead>
<tbody>
<?php if(!empty($row)) foreach($row as $rows)
{
?>
<tr>
<td><?php echo $rows['name']; ?></td>
<td><?php echo $rows['branch']; ?></td>
<td><?php echo $rows['roll_no']; ?></td>
</tr>
32
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
<?php } ?>
</tbody>
</table>
</body>
</html>
<?php mysqli_close($conn);
?>
RESULT:
Thus, the information retrieval system has been created and executed successfully.
33
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
AIM:
ALGORITHM:
Step 1: Start the program by defining the HTML structure with necessary tags and elements.
Step 2: Include CSS stylesheets to style the elements on the page.
Step 3: Create a flex container with two flex child elements – one for the form and another is for displaying
records.
Step 4: Inside the forms, create input fields for name, city and salary.
Step 5: Add a submit button to the form and attach an event listener to it.
Step 6: Implement the JavaScript function ‘onFormSubmit()’ to handle the form submission.
Step 7: Inside ‘onFormSubmit()’, read the form data and store it in an object.
Step 8: If no row is selected (insert mode), insert a new row in the table and display the
data. Step 9: If a row is selected (edit mode), update the selected row with the new data.
Step 10: Implement additional functions to handle editing and deleting records, such as ‘onEdit()’ and
‘onDelete()’.
Step 11: Step the program.
PROGRAM:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CRUD Operation</title>
34
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
35
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
</table>
</div>
<div class="flex-child green">
<td>
<table id="empList">
<hl id="record">Record</h1>
<thead id="tab_head">
<tr>
<th>Emp-Name</th>
<th>City</th>
<th>Salary</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody id-"tab_body">
</tbody>
</table>
</td>
</div>
</div>
<script src="./Crud.js"></script>
</body>
</html>
36
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
Crud.css
*{
box-sizing:border-box;
}
.flex-container { display: flex;
}
.flex-child { flex: 1;
text-align: -webkit-center;
border: 2px solid rgb(255, 162, 162);
}
.flex-child:first-child { margin-right: 20px;
}
.container { padding: 16px;
}
input[type="text"], input[type="text"] { width: 100%; padding: 15px; margin: 5px 0 22px 0;display: inline-
block; border: none; background: #flflfl;
}
input[type="number"]:focus, input[type="number"]:focus { background-color: #ddd; outline: none;
}
#heading1 { margin-top: 0px; text-align: center; font-size: 40px;
} #p1{
margin-top: 0px; text-align: center; font-size: 20px;
}
#label {
font-size: 22px;
}
37
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
#salary {
border: 1px inherit; border-radius: 30px; font-size: 18px; height: 30px;
color: black;
justify-content: space-between;
}
hr {
border: 1px solid #fiflfl; margin-bottom: 25px;
.registerbtn {
background-color: #04aa6d; color: white;
padding: 16px 20px; margin: 8px 0; border:
none; cursor: pointer; width:
100%; opacity: 0.9; height: 50px;
border-radius: 30px; font-size: 20px;
}
.registerbtn:hover { opacity: 1;
}
a{
color: dodgerblue; cursor: pointer;
}
background-color: #fififl; text-align: center;
}
#empList, th,
td {
border: 2px solid rgb(214, 130, 130); border-collapse: collapse;
}
th,
38
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
td {
padding: 10px;
}
th {
background-color: rgb(175, 173, 173);
}
#empList#alter tr:nth-child(even) { background-color: rgb(230, 89, 89);
}
#empList#alter tr:nth-child(odd) { background-color: rgb(197, 38, 38);
}
#empList#alter th{ color: white; background-color: gray;
#record { display: flex;
justify-content: center;
}
Crud.js
let selectRow = null; function onFormSubmit()
{ let formData = readFormData();
if (selectRow == null) insertNewRecord(formData); else updateRecord(formData);
resetForm();
}
function readFormData() { var formData = {};
formData["name"]= document.getElementById("name").value; formData["city"] =
document.getElementById("city").value; formData["salary"] = document.getElementById("salary").value;
// console.log(formData); return formData;
}
function insertNewRecord(data) { let table = document
39
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
.getElementById("empList")
.getElementsByTagName("tbody")[0];
let newRow = table.insertRow(table.length); cell1 = newRow.insertCell(0); cell1.innerHTML = data.name;
cell2 = newRow.insertCell(1); cell2.innerHTML = data.city; cell3 = newRow.insertCell(2); cell3.innerHTML =
data.salary; cell4= newRow.insertCell(3);
cell4.innerHTML=’<a onclick="onEdit(this)">Edit</a>'; cell5= newRow.insertCell(4);
cell5.innerHTML = ‘<a onclick="onDelete(this)">Delete</a>';
}
function resetForm() { document.getElementById("name").value = "";
document.getElementById("city").value=””; document.getElementById("salary").value = ""; selectRow =
null;
function on Edit(td) { selectRow=td.parentElementparentElement;
document.getElementById(name").value=selectRow.cells[0].innerHTML;
document.getElementById("city").value = selectRow.cells[1].innerHTML;
document.getElementById("salary").value = selectRow.cells[2].innerHTML;
}
function updateRecord(formData) { selectRow.cells[0].innerHTML = formData.name;
selectRow.cells[1].innerHTML = formData.city; selectRow.cells[2].innerHTML = formData.salary;
}
function onDelete(td) {
if (confirm ("Are you want to delete this record?")) {row = td.parentElement.parentElement;
document.getElementById("empList").deleteRow(row.ro wIndex); resetForm();
}
}
RESULT:
Thus, the program is created a Personal information system for managing employee records successfully
40
Downloaded by saranya s ([email protected])
lOMoARcPSD|57062442
41
Downloaded by saranya s ([email protected])