WT Lab Manual
WT Lab Manual
: 22IT104001
N MOHANBABU UNIVERSITY
Sree Sainath Nagar, Tirupati 517102
(22IT104001) Web Technologies
Lab Manual
Task 1: Login Form
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Avinash Baratam">
<meta name="description" content="It is a login form">
<title>Login Form</title>
<style>
body{
background-color: #333;
color: whitesmoke;
font-family: 'Times New Roman', Times, serif;
}
form{
text-align: center;
}
a{
color: aliceblue;
}
</style>
</head>
<body>
<h1 align="center">Student Login Form</h1>
<form action="https://httpbin.org/get" method="get">
<label for="username">Username : </label>
<input type="text" id="username" name="username" placeholder="Enter Username"
autofocus required><br><br>
<label for="password">Password : </label>
<input type="password" id="password" name="password" placeholder="Enter
Password" required><br><br>
<button type="submit" onclick="alert('No database recognized...!!!')">Login</button>
<br>
<label for="rememberme"><input type="checkbox" value="Remember me"
id="rememberme" name="remember me">Remember me</label>
<button type="reset">Cancel</button>
<p>Forgot <a href="forgotpassword.html">password?</a></p>
</form>
</body>
</html>
Task 2 :Course Registration Form
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Avinash Baratam">
<meta name="description" content="It is a Course registration form">
<title>Course Registration Form</title>
<style>
html{
font-size: 22;
}
body{
background-color: #333;
color: whitesmoke;
font-family: 'Times New Roman', Times, serif;
}
</style>
</head>
<body>
<h1 align="center">Course Registration Form</h1>
<form action="https://httpbin.org/get" method="get">
<label for="fname">First Name : </label>
<input type="text" id="fname" name="firstName" autofocus required><br><br>
<label for="mname">Middle Name : </label>
<input type="text" id="mname" name="middleName"><br><br>
<label for="lname">Last Name : </label>
<input type="text" id="lname" name="lastName" required><br>
<p>
Gender :
<select name="gender" id="gender">
<option value="select" selected>-select-</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</p>
<p>
Course:
<select name="course" id="course">
<option value="select">-select-</option>
<option value="java">JAVA</option>
<option value="c">C</option>
<option value="python">PYTHON</option>
<option value="c++">C++</option>
<option value="sql">SQL</option>
<option value="rLanguage">R LANGUAGE</option>
<option value="fullstack">FULL STACK</option>
</select>
</p>
<p>
Phone:
<input type="text" name="countrycode" value="+91" size="3">
<input type="text" name="phone" size="10"><br><br>
</p>
<p>
<label for="add">Address : </label><br>
<textarea name="address" id="add" cols="50" rows="5" placeholder="Type your
address here...."></textarea>
</p>
<p>
<label for="email">E-mail : </label>
<input type="email" id="email" name="email" placeholder="[email protected]">
</p>
<p>
<label for="pswd">Password : </label>
<input type="password" id="pswd" name="password" required>
</p>
<p>
<label for="repswd">Re-type password : </label>
<input type="password" id="repswd" name="repassword" required>
</p>
<p>
<label for="dob">Date of Birth(dd/mm/yyyy) :</label>
<input type="date" id="dob" name="dob">
</p>
<p>
<label for="image">Upload your image :</label>
<input type="file" id="image" name="candidateImage">
</p>
<p>
<button value="submit" onclick="alert('No database
available....!!!')">Submit</button>
</p>
</form>
</body>
</html>
Task 3: Animation Navbar Menu
Code :
<!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>CSS Animated Menu</title>
<link rel="stylesheet" href="menu.css">
</head>
<body>
<header>
<section class="header-title-line">
<h1>Acme Co.</h1>
<button class="menu-button">
<div class="menu-icon"></div>
</button>
</section>
<nav>
<ul>
<li><a href="products.html">Products</a></li>
<li><a href="#">Forum</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
</main>
</body>
</html>
Task 4: Write a JavaScript/JQuery code to validate the following fields of the Registration
web page.
a. First Name/Last Name - should contain only alphabets and the length should not be
less than 8 characters.
b. Username - It should contain combination of alphabets, numbers and underscore. It
should not allow spaces and special symbols.
c. Password - It should not less than 8 characters in length and it contains one uppercase
letter and one special symbol.
d. Date of Birth - It should allow only valid date; otherwise display a message stating that
entered date is invalid. Ex. 29 Feb. 2009 is an invalid date.
e. Postal Code: It must allow only 6 digit valid number.
f. Mobile No. - It should allow only numbers and total number of digits should be equal to
10.
g. e-mail id - It should allow the mail id with the following format:
Ex. [email protected]
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LAB-4</title>
<style>
body {
background-image: url("https://img.freepik.com/free-photo/top-view-blue-monday-
concept-composition-with-telephone_23-2149139103.jpg");
background-repeat: no-repeat;
background-size: cover;
}
#submit {
margin-left: 30%;
margin-top: 40px;
}
.container {
margin-left: 50%;
transform: translateX(-50%);
position: absolute;
top: 20%;
transform: translateX(-50%);
}
table tr td {
padding: 10px;
}
input {
padding: 7px;
width: 200px;
}
h1 {
margin-left: 46%;
color: green;
font-size: 40px;
}
p{
visibility: hidden;
display: inline-block;
}
label {
font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>
<h1>Contact form</h1>
<div class="container">
<form>
<table>
<tr>
<td>
<label for="first-name">First Name:</label>
</td>
<td>
<input type="text" id="first-name" placeholder="Chandrahaas Reddy">
<p id="fn_i"></p>
</td>
</tr>
<td>
<label for="last-name">Last Name:</label>
</td>
<td>
<input type="text" id="last-name" placeholder="Bhumireddy">
<p id="ln_i"></p>
</td>
</tr>
<td>
<label for="user-name">User Name:</label>
</td>
<td>
<input type="text" id="user-name" placeholder="chandrahaas_reddy_18">
<p id="un_i"></p>
</td>
</tr>
<td>
<label for="password">Password:</label>
</td>
<td>
<input type="password" id="password" placeholder="password">
<p id="p_i"></p>
</td>
</tr>
<td>
<label for="dob">Date Of Birth:</label>
</td>
<td>
<input type="date" id="dob">
</td>
</tr>
<td>
<label for="Postal-code">Postal Code:</label>
</td>
<td>
<input type="text" id="Postal-Code" minlength="8">
<p id="pc_i"></p>
</td>
</tr>
<td>
<label for="mobile-number">Mobile Number:</label>
</td>
<td>
<input type="text" id="mobile-number">
<p id="mn_i"></p>
</td>
</tr>
</table>
<input id="submit" type="submit" onclick="validate()">
</form>
</div>
<script>
function loop(word,len)
{
for(let i=0;i<len;i++)
{
if (!(word[i] >= "a" && word[i] <= "z") &&
!(word[i]>= "A" && word[i] <= "Z"))
{
return false;
}
}
return true;
}
function validate()
{ //first name
event.preventDefault();
let f_n = document.querySelector("#first-name").value;
if (f_n.length>8)
{
if (!loop(f_n,f_n.length))
{
let fn_p = document.querySelector("#fn_i");
fn_p.innerHTML="<i>first name Contains more than or equal to 8 charcaters but has
non aphabets in it.</i>";
fn_p.style.visibility="visible";
fn_p.style.color="red";
}
}
else{
let fn_p = document.querySelector("#fn_i");
fn_p.innerHTML="<i>first name Contains less than 8 charcaters.</i>";
fn_p.style.visibility="visible";
fn_p.style.color="red";
}
//LAST NAME
event.preventDefault();
let l_n = document.querySelector("#last-name").value;
if (l_n.length>8)
{
if (!loop(l_n,l_n.length))
{
let ln_p = document.querySelector("#ln_i");
ln_p.innerHTML="<i>Last name Contains more than 8 charcaters and it has non
alphabets in it.</i>";
ln_p.style.visibility="visible";
ln_p.style.color="red";
}
}
else{
let ln_p = document.querySelector("#ln_i");
ln_p.innerHTML="<i>Last name Contains less than 8 charcaters.</i>";
ln_p.style.visibility="visible";
ln_p.style.color="red";
}
//USER NAME
event.preventDefault();
let u_n = document.querySelector("#user-name").value;
if (u_n.length>8)
{
let ss=0,u=0,s=0,a=0,n=0;
for(let i=0;i<u_n.length;i++)
{
if (u_n[i] == "_")
{
u=1;
}
else if(u_n[i]=="@"||u_n=="$"||u_n=="!")
{
ss=1;
}
else if(u_n[i]==" ")
{
s=1;
}
else if ((u_n[i] >= "a" && u_n[i] <= "z") &&(u_n[i]>= "A" && u_n[i] <= "Z"))
{
a=1;
}
else if (u_n[i]>='0' && u_n[i]<='9')
{
n = 1;
}
}
if (ss==1)
{
let un_p = document.querySelector("#un_i");
un_p.innerHTML="<i>User name Contains more than 8 charcaters but it contains
special syombal.</i>";
un_p.style.visibility="visible";
un_p.style.color="red";
}
else if(s==1)
{
let un_p = document.querySelector("#un_i");
un_p.innerHTML="<i>User name Contains more than 8 charcaters but it conatins
spaces.</i>";
un_p.style.visibility="visible";
un_p.style.color="red";
}
else if(u==0)
{
let un_p = document.querySelector("#un_i");
un_p.innerHTML="<i>User name Contains more than 8 charcaters but it doesn't
contain underscore.</i>";
un_p.style.visibility="visible";
un_p.style.color="red";
}
else if(n==0)
{
//PASSWORD
event.preventDefault();
let p_n = document.querySelector("#password").value;
if (p_n.length>8)
{
let ss=0,u=0;
for(let i=0;i<u_n.length;i++)
{
if(u_n[i]=="@"||u_n=="$"||u_n=="!")
{
ss+=1;
}
else if(u_n[i] == u_n[i].toUpperCase())
{
un+=1;
}
}
if (ss>1)
{
let p_p = document.querySelector("#p_i");
p_p.innerHTML="<i>Password Contains more than 8 charcaters but it contains special
syombal more than 1.</i>";
p_p.style.visibility="visible";
p_p.style.color="red";
}
else if(un>1)
{
let p_p = document.querySelector("#p_i");
p_p.innerHTML="<i>Password Contains more than 8 charcaters but it conatins
uppercases more than 1.</i>";
p_p.style.visibility="visible";
p_p.style.color="red";
}
else if(u>1)
{
let p_p = document.querySelector("#p_i");
p_p.innerHTML="<i>Password Contains more than 8 charcaters but it doesn't contain
uppercase.</i>";
p_p.style.visibility="visible";
p_p.style.color="red";
}
else if(ss==0)
{
let p_p = document.querySelector("#p_i");
p_p.innerHTML="<i>Password Contains more than 8 charcaters but it doesn't special
syombal.</i>";
p_p.style.visibility="visible";
p_p.style.color="red";
}
else if (a==0)
{
else{
let p_p = document.querySelector("#p_i");
p_p.innerHTML="<i>Password Contains less than 8 charcaters.</i>";
p_p.style.visibility="visible";
p_p.style.color="red";
}
//POSTAL CODE
let pc_i= document.querySelector("#Postal-Code").value;
let n=0;
for(let i=0;i<pc_i.length;i++)
{
if (pc_i[i]>='0' && pc_i[i]<='9')
{
n+=1;
}
}
console.log(n,pc_i.length);
if (n!==pc_i.length)
{
let p = document.querySelector("#pc_i");
p.innerHTML="<i>Postal code contains alphabets.</i>";
p.style.visibility="visible";
p.style.color="red";
}
else if (pc_i.length<6)
{
let p = document.querySelector("#pc_i");
p.innerHTML="<i>Postal code less than 6 charcaters.</i>";
p.style.visibility="visible";
p.style.color="red";
}
else if (pc_i.length>6)
{
let p = document.querySelector("#pc_i");
p.innerHTML="<i>Postal code more than 6 charcaters.</i>";
p.style.visibility="visible";
p.style.color="red";
}
//MOBILE NUMBER
else if (m_i.length>10)
{
let p = document.querySelector("#mn_i");
p.innerHTML="<i>Mobile number contains more than 10 digits.</i>";
p.style.visibility="visible";
p.style.color="red";
}
</script>
</body>
</html>
Task 5: Design a web page with the following features using HTML5, JavaScript and JQuery
a. Displaying of images with Custom animated effects
b. Playing of selected video from the list of videos
c. Showing the animated text in increasing and decreasing font size
d. Changing the size of the area in a web page using DIV tag
e. Hiding and Showing elements in a web page.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Web Page</title>
<link rel="stylesheet" href="styles.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="script.js" defer></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
padding: 20px;
}
#image-gallery {
display: flex;
gap: 20px;
margin-bottom: 20px;
}
.gallery-image {
width: 200px;
height: auto;
cursor: pointer;
}
#video-player {
margin-bottom: 20px;
}
#animated-text {
margin-bottom: 20px;
}
#resizable-area {
border: 2px solid #333;
padding: 20px;
width: 200px;
margin-bottom: 20px;
}
.hide-show-text {
margin-bottom: 20px;
}
</style>
</head>
<body>
$('#decrease-size').click(function() {
$('.animating-text').animate({ 'font-size': '-=10px' }, 500);
});
$('#show-element').click(function() {
$('.hide-show-text').show();
});
});
</script>
</body>
</html>
Task 6: Design a web page with the following features using Bootstrap and Media Query.
a. Components
b. Responsive tables
c. Responsive images and videos
d. Toolbars, Buttons and Lists
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bootstrap Web Page</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet">
<style>
/* Media Queries for different screen sizes */
@media (max-width: 768px) {
.navbar-nav {
text-align: center;
}
.table-responsive {
overflow-x: auto;
}
.btn-toolbar {
flex-direction: column;
align-items: stretch;
}
.btn-group {
margin-bottom: 10px;
}
}
.embed-responsive {
height: auto;
}
.list-group-item {
font-size: 0.9rem;
}
}
</style>
</head>
<body>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></
script>
</body>
</html>
Task 7: Write a PHP code to read user details entered through the registration web page
and store the same into MySQL database.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form</title>
<style>
*{
margin: 0px;
padding: 0px;
font-family: Arial;
}
body {
background-color: rgb(34, 34, 34);
}
form {
background-color: rgb(255, 0, 0);
display: flex;
gap: 25px;
flex-direction: column;
width: fit-content;
padding: 35px;
border: 3px solid white;
border-radius: 20px;
margin: auto;
margin-top: 20px;
}
input {
width: 245px;
height: 47px;
border: none;
border-radius: 17px;
padding-left: 15px;
font-size: 15px;
outline: none;
}
textarea {
font-size: 15px;
padding-left: 10px;
padding-top: 12px;
outline-color: green;
border-radius: 15px;
}
button {
border-radius: 20px;
height: 45px;
font-size: 17px;
border: 1.5px solid rgb(108, 108, 108);
background-color: antiquewhite;
}
button:hover {
background-color: rgb(255, 218, 170);
transition: all 0.3s ease;
}
#beyond {
width: fit-content;
height: fit-content;
}
#year {
width: 245px;
height: 47px;
border: none;
border-radius: 17px;
padding-left: 15px;
font-size: 15px;
outline: none;
}
</style>
</head>
<body>
<h1 align="center" style="color: white; margin-top:100px;">Registration Form</h1>
<form action="prac3.php" method="post">
<input type="text" placeholder="Enter your name" name="name" required>
<input type="email" placeholder="Enter your email" name="email" required>
<input type="password" placeholder="Enter password" name="password" required>
<input type="number" placeholder="Enter your age" name="age" required>
<input type="date" name="date" id="date">
<div class="box1">
<input type="radio" name="gender" id="beyond" value="Male"> Male
<input type="radio" name="gender" id="beyond" value="Female" style="margin-left:
15px;"> Female
</div>
<div class="box2">
<input type="checkbox" name="course[]" id="beyond" value="C"> C
<input type="checkbox" name="course[]" id="beyond" value="Java" style="margin-
left: 5px;"> Java
<input type="checkbox" name="course[]" id="beyond" value="Python"
style="margin-left: 5px;"> Python
<input type="checkbox" name="course[]" id="beyond" value="DBMS" style="margin-
left: 5px;"> DBMS
</div>
<select name="year" id="year" required>
<option value="I">I</option>
<option value="II">II</option>
<option value="III">III</option>
<option value="IV">IV</option>
</select>
<textarea name="query" id="query" cols="30" rows="7" placeholder="Enter other
queries"></textarea>
<button name="submit">Submit</button>
</form>
</body>
</html>
PHP code : prac3.php:
<?php
if (isset($_POST['submit'])) {
$server = "localhost";
$username = "root";
$password = "";
if (!$conn) {
die("Error" . mysqli_connect_error());
}
$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
$age = $_POST['age'];
$date = $_POST['date'];
$gender = $_POST['gender'];
$course = $_POST['course'];
$year = $_POST['year'];
$query = $_POST['query'];
$sql = "INSERT INTO `table`.`register2` (`name`, `email`, `password`, `age`, `date`, `gender`,
`course`, `year`, `query`, `dt`) VALUES ('$name', '$email', '$password', '$age', '$date',
'$gender', '$allCourses', '$year', '$query', current_timestamp());";
if ($conn->query($sql) == true) {
echo "Success";
} else {
echo "Error" . mysqli_error($conn);
}
$conn->close();
}
?>
Task 8: Write a PHP code to read the username and password entered in the Login form of
the online book store and authenticate with the values available in cookies. If user enters
a valid username and password, welcome the user by username otherwise display a
message stating that, entered details are invalid.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Online Book Store Login</title>
</head>
<body>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
USE online_bookstore;
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$stmt->close();
}
$conn->close();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add Book</title>
</head>
<body>
<label for="author">Author:</label>
<input type="text" id="author" name="author" required><br><br>
<label for="publisher">Publisher:</label>
<input type="text" id="publisher" name="publisher" required><br><br>
<label for="edition">Edition:</label>
<input type="text" id="edition" name="edition"><br><br>
<label for="price">Price:</label>
<input type="text" id="price" name="price" required><br><br>
</body>
</html>
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Book Catalogue</title>
</head>
<body>
<h2>Book Catalogue</h2>
<?php
if ($result->num_rows > 0) {
echo "<table border='1'>";
echo
"<tr><th>Name</th><th>Author</th><th>Publisher</th><th>Edition</th><th>Price</
th></tr>";
// Output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td>" . $row["name"]. "</td><td>" . $row["author"]. "</td><td>" .
$row["publisher"]. "</td><td>" . $row["edition"]. "</td><td>" . $row["price"]. "</td></tr>";
}
echo "</table>";
} else {
echo "0 results";
}
$conn->close();
?>
</body>
</html>
Task 10 : Online quiz platform
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
<title>Quiz -1</title>
</head>
<body>
<form action="quiz1submit.php" method="post">
<div class="whole-box">
<div class="question-box">
<h3 id="question" >Who is the prime minister of India?</h3>
<div class="opt-group">
<input type="radio" name="question1" value="Narendra Modi" class="option">
Narendra Modi <br>
<input type="radio" name="question1" value="Rajeev Gandhi" class="option">
Rajeev Gandhi <br>
<input type="radio" name="question1" value="Murmu" class="option"> Murmu <br>
<input type="radio" name="question1" value="None" class="option"> None <br>
</div>
</div>
<div class="question-box">
<h3 id="question" >Who is the president of india?</h3>
<div class="opt-group">
<input type="radio" name="question2" value="Narendra Modi" class="option">
Narendra Modi <br>
<input type="radio" name="question2" value="Rajeev Gandhi" class="option">
Rajeev Gandhi <br>
<input type="radio" name="question2" value="Murmu" class="option"> Murmu <br>
<input type="radio" name="question2" value="None" class="option"> None <br>
</div>
</div>
<div class="question-box">
<h3 id="question" >How many wonders are present in the world ?</h3>
<div class="opt-group">
<input type="radio" name="question3" value="8" class="option"> 8 <br>
<input type="radio" name="question3" value="7" class="option"> 7 <br>
<input type="radio" name="question3" value="9" class="option"> 9 <br>
<input type="radio" name="question3" value="5" class="option"> 5 <br>
</div>
</div>
<div class="question-box">
<h3 id="question" >What is the capital of India?</h3>
<div class="opt-group">
<input type="radio" name="question4" value="Delhi" class="option"> Delhi <br>
<input type="radio" name="question4" value="Jaipur" class="option"> Jaipur <br>
<input type="radio" name="question4" value="Andaman" class="option"> Andaman
<br>
<input type="radio" name="question4" value="Hyderabad" class="option">
Hyderabad <br>
</div>
</div>
<div class="question-box">
<h3 id="question" >What is the Capital of AndhraPradesh ?</h3>
<div class="opt-group">
<input type="radio" name="question5" value="Amaravati" class="option"> Amaravati
<br>
<input type="radio" name="question5" value="Vizag" class="option"> Vizag <br>
<input type="radio" name="question5" value="Kurnool" class="option"> Kurnool
<br>
<input type="radio" name="question5" value="All" class="option"> All <br>
</div>
</div>
<button name="submit">Submit</button>
</div>
</form>
</body>
</html>
PHP Code:
<?php
if(isset($_POST['submit'])){
$server = "localhost";
$username = "root";
$password = "";
if(!$connect){
die("Connection Failed! due to ".mysqli_connect_error());
}
$question1 = $_POST['question1'];
$question2 = $_POST['question2'];
$question3 = $_POST['question3'];
$question4 = $_POST['question4'];
$question5 = $_POST['question5'];
if ($connect->query($sql)) {
echo "Success";
} else {
echo "Error";
}
$connect->close();
}
?>