ISLAMIAH WOMEN’S ARTS AND SCIENCE COLLEGE
Recognized by UGC under section 2(f) and 12 (b) of the UGC Act 1956,
Permanently affiliated with Thiruvalluvar University and Approved by the
Govt of Tamilnadu,
Accredited by the NAAC with “B” Grade
VANIYAMBADI, TIRUPATTUR DIST.
2023-2024
RECORD NOTE BOOK
DEPARTMENT OF COMPUTER APPLICATION
NAME :
REGISTER NUMBER :
CLASS :
ISLAMIAH WOMEN’S ARTS AND SCIENCE
COLLEGE
Recognized by UGC under section 2(f) and 12 (b) of the UGC Act 1956, Permanently
affiliated with Thiruvalluvar University and Approved by the Govt of Tamilnadu,
Accredited by the NAAC with “B” Grade
VANIYAMBADI, TIRUPATTUR DIST.
DEPARTMENT OF COMPUTER APPLICATION
Subject:
Class: Register No:
CERTIFICATE
Bonafide record of work done in the Computer Centre of Islamiah Women’s Arts and
Science College, during the year 2023 – 2024.
Head of the Department Professor-In-Charge
Submitted for the Degree Practical Examination held at Islamiah
Women’s Arts and Science College, Vaniyambadi on .
External Examiner Internal Examiner
PAGE SIGN
S.N NO
DATE INDEX
O.
01 Create a Web Page with Frames and Tables
02 Create a Web Page Incorporating CSS
03 Shell program to Find the Factorial and Integer
Positive Number
04 Shell program to Find the details of a user session
05 Create a Simple Calculator in JavaScript
06 Javascript program to Scroll your name in the
Scrollbar
07 Message Passing Mechanism between Pages
08 Application for Email Registration and Login using
PHP and MySQL
09 Program to create a file and write the data into it using
PHP
10 Program to perform the String Operation using Perl
1
EX NO: 01 CREATING A WEBPAGE WITH FRAMES AND TABLES
DATE:
AIM:
To write a Html program for creating web pages with frames and tables.
ALGORITHM:
STEP1: Open notepad.
STEP2: Type the program for frameset and save a file with [Link].
STEP3: Type the program for top frame and save a file with [Link].
STEP4: Type the program for right frame and save a file with right [Link].
STEP5: Type the program for left frame and save a file with [Link].
STEP6:Type the program for top frame and save a file with [Link].
STEP7:Type the program for top frame and save a file with [Link].
STEP8:Type the program for table and save a file with [Link].
STEP5:Type the program for left frame and save a file with [Link].
STEP6:Type the program for left frame and save a file with [Link].
STEP5:Type the program for left frame and save a file with [Link].
STEP6:Type the program for left frame and save a file with [Link].
STEP9: Run the program in web browser.
2
PROGRAM:
HOMEPAGE
<html>
<head>
<title>Book Store</title></head>
<frameset rows="20%,*">
<frame src="[Link]" name="f1">
<frameset cols="20%,*">
<frame src="[Link]" name="f2">
<frame src="[Link]" name="f3">
</frameset>
</frameset>
</html>
TOPFRAME:
<html>
<body bgcolor=#bbffbb>
<table border="1" width="100%">
<tr>
<th width="14%">
</th>
<th>Online Book store</th>
</tr>
</table>
<table border="1" width="100%">
<tr>
3
<th><a href="[Link]" target="f3">Home</a></th>
<th><a href="[Link]" target="f3">login</a></th>
<th><a href="[Link]" target="f3">registration</a></th>
<th><a href="[Link]" target="f3">Catalogue</a></th>
<th><a href="[Link]" target="f3">Cart</a></th>
</tr>
</table>
</body>
</html>
RIGHT FRAME:
<html>
<body bgcolor="white">
<p>
<h2 align="center"><font face="times new roman" color="green">online book store
information</font></h2>
<h3>
<font face="monotype corsiva" color="blue">This is the online book developed by
students of IWC. It contains book catalogue of various branches like
BSC,BCA,BBA,BIO</font></h3>
</p>
</body>
</html>
LEFTFRAME
<html>
<body>
<center>
<a href=[Link] target="f3"><h3>BSC</h3></a><br><br><br><br><br>
<a href=[Link] target="f3"><h3>BCA</h3></a><br><br><br><br><br>
<a href=[Link] target="f3"><h3>BBA</h3></a><br><br><br><br><br>
<a href=[Link] target="f3"><h3>BIO</h3></a><br><br><br><br><br>
4
</center>
</body>
</html>
CATALOGUE
<html>
<head>
<title>Catalogue</title>
</head>
<body bgcolor="pink">
<form>
<table border="1" width="100%">
<tr>
<td><img src="[Link]" width=100 height=100/></td>
<td> Book:Java Programming<br>Author:[Link] Ahmed<br>
Margham publication,Chennai.</td>
<td>Rs.150 </td><td>
<input type="button" value="Add to cart"/></td></tr>
<tr><td><img src="[Link]" width=100 height=100/></td>
<td>Book:Internet and its Applications<br>
Author:[Link] Ahmed<br>Margham Publication,Chennai.</td>
<td>Rs.140 </td>
<td>
<input type="button" value="Add to Cart"/></td>
</tr>
</table>
</form>
</body>
</html>
CART
<html>
<body>
<center><br><br><br>
<table border=1 cell padding=center>
<thread>
<tr>
<th>Book name</th>
5
<th>Price</th>
<th>Quantity</th>
<th>Amount</th>
</tr>
</thread>
<tr>
<td>java programming</td>
<td>$45</td>
<td>2</td>
<td>$70</td>
</tr>
<tr>
<td>Internet and its application</td>
<td>$20</td>
<td>5</td>
<td>$40</td>
</tr>
<th cols pan=4>total amount=$110
</th>
</table>
</center>
</body>
<html>
REGISTER
<html>
<head>
<title>New User!</title>
</head>
<body>
<form><center><h1><font size="3">Registration Form</font></h1>
<hr width="50%">
User Name: <input type="text" maxlength=15 size=25/><br/><br/>
Password: <input type="password" maxlength=15 size=25/><br/><br/>
Confirm Password:<input type="password" maxlength=15 size=25/><br/><br/>
Gender: <input type="radio" name="gender">Male</input><input type="radio"
name="gender">Female</input><br/><br/>
6
Email Id: <input type="text" maxlength=15 size=25/><br/><br/>
Address: <textarea rows=5 cols=30></textarea><br/><br/>
<input type="submit" value="Submit"/>
<input type="reset" Value="Reset"/>
</form>
</body>
</html>
LOGIN
<html>
<head>
<title>Login</title>
</head>
<body bgcolor="pink">
<center>
<form> <b>Login:
<input type="text" name="login"/><br><br>
Password:<input type="password" name="password"/><br><br>
<input type="submit" value="Submit"/>
<input type="reset" value="Reset"/></b>
</form>
</center>
</body>
</html>
[Link]
<html>
<body bgcolor="cyan">
BookList<br>
Internet and its Application
<br>
Data Mining<br>
Cryptography<br>
programming in c++ and data structure<br>
</body>
</html>
7
[Link]
<html>
<body bgcolor="yellow">
BookList<br>
Open source software
<br>
Python programming<br>
Big data analytics<br>
programming in c++ and data structure<br>
</body>
</html>
[Link]
<html>
<body bgcolor="cyan">
BookList<br>
Mathematical Foundations
<br>
Bussiness Administration<br>
Management concepts<br>
Business statics<br>
</body>
</html>
[Link]
<html>
<body bgcolor="cyan">
BookList<br>
Organic chemistry
<br>
Physical chemistry<br>
Biological Dynamics<br>
</body>
</html>
8
OUTPUT:
HOMEPAGE
LOGIN
9
REGISTER
CATALOGUE
10
CART
BCA
11
RESULT:
Hence , the program for creating webpage with frame and table is executable and
result has been verified.
12
EX NO : 02 Create a Web Page Incorporating CSS
DATE: (Cascading Style Sheets)
AIM:
To write a program for Cascading style sheets.
ALGORITHM:
STEP1:Open notepad.
STEP2:Type the program for internal style sheet and save a file with
[Link].
STEP3:Type the program for external style sheet and save a file with
[Link].
STEP4:Type the program for inline style sheet and save a file with in [Link].
STEP5:Type the program for css style and save a file [Link] extension.
STEP6:Run a program in web browser.
13
INLINEELEMENT:
<html>
<body style="background-color:lightcyan">
<h1>Multiple styles will cascade into one</h1>
<p>In this example, the background color is set inline, in an internal stylesheet,
in an external style sheet
</p>
<p>Experimenting by removing styles to see how the cascading style sheets work
</p>
</body>
</html>
INTERNALSTYLESHEET:
<html>
<head>
<style>
body{background-color:green;}
#firstname{background-color:yellow;}
</style>
</head>
<body>
<divstyle="position:static; border-style: solid; color: red; top:100px; right:150px;">BSC
</div><br>
<divstyle="position:static;border-style:clashed;color:blue;">BCA</div>
14
<h1>Multiple Styles will cascade into one</h1>
<p>In this example, the background-color is set inline, in an internal style sheet,
and in an external style sheet.
</p>
<p id="first name"> Try experimenting by remaining styles to see how the
cascading style sheet work.
</p>
</body>
</html>
EXTERNALSTYLESHEET:
<html>
<head>
<link rel="stylesheet" type="text/css" href="[Link]">
<styletype="text/css">
[Link]{color:red}
[Link]{color:green:}/*moreoverlink*/a
.active{color:yellow:}/*selectedlink*/
</style>
</head>
<body>
<p><b><a href="[Link]">This is a link.
</a></b></p>
<h1>Multiple Style will cascade into one</h1>
15
<p class="xxx">In this example, the background color is set inline in an internal
style sheet, and an external style sheet.</p>
<p>Try experimenting by remaining style to see how the cascading style sheet
work. </p>
</body>
</html>
[Link]
body{
background-color:lightblue;
h1{
color: navy;
margin-left:20px;
16
OUTPUT:
INLINEELEMENT:
INTERNALSTYLESHEET:
17
EXTERNALSTYLESHEET:
18
RESULT:
Hence, The program for style sheet is created and the result has been verified.
19
EX NO: 03 SHELL PROGRAM TO FIND THE FACTORIAL OF AN
DATE: INTEGER POSITIVE NUMBER
AIM:
To write a shell program for factorial of a number
ALGORITHM:
STEP1:Open the program
STEP2:Create a file with vi [Link]
STEP3: Press esc and i and type the program
STEP4: Press Esc and Shift: wq to save the program
STEP5:Run a program ,with / [Link] extension
20
PROGRAM:
echo "Enter a number"
read n
if [ $n -gt 0 ]
then
i=1
f=1
while [ $i -le $n ]
do
f=`expr $f \* $i`
i=`expr $i + 1`
done
echo "Factorial of $n is $f"
else
echo "Enter a positive integer"
fi
21
OUTPUT:
Enter a number
4
Factorial of 4 is 24
Enter a number
-9
Enter a positive integer
22
RESULT:
Hence, A Shell program for factorial of a number is executed and Result has been
verified.
23
EX NO: 04 SHELL PROGRAM TO FIND THE DETAILS
DATE: OF USER SESSION
AIM:
To Write a shell program to check whether the given string is palindrome or not
ALGORITHM:
STEP1:Open cygwin terminal
STEP2:Create a file with vi [Link]
STEP3:Press esc and i type the program
STEP4:Press esc and Shift:wq to save the program
STEP5: To run the program sh [Link] extension.
24
PROGRAM:
function line(){
echo "***************"
}
echo "your username : $(echo $USER)"
line
echo "current date and time : $(date)"
line
echo "currently logged on users:"
who
line
25
OUTPUT:
$ sh [Link]
your username : user20
***************
current date and time : Wed Apr 26 [Link] IST 2023
***************
currently logged on users:
***************
26
RESULT:
Hence a Shell program is finding the details of user session is executed and the
result has been verified.
27
EX NO: 05 CREATE A SIMPE CALCULATOR IN JAVASCRIPT
DATE:
AIM:
To write a javascript program for creating simple calculator
ALGORITHM:
STEP1:Open notepad.
STEP2:Type the program.
STEP3:Save the program [Link].
STEP4:Run the program in the web browser.
28
PROGRAM:
<html>
<head>
<title>JavaScript Calculator</title>
<style>
h1{
text-align:center;
padding:23px;
background-color:skyblue;
color:white;
}
#clear
{
width:270px;
border:3px solid gray;
border- radius:3px;
padding:20px;
background-color:red;
}
.formstyle
{
width:300px;
height:530px;
margin:auto;
border:3px solid skyblue;
border- radius:5px;
29
padding:20px;
}
input
{
width:20px;
background- color:green;
color:white;
border:3px solid gray;
border- radius:5px;
padding:2 6px;
margin:5px;
font-size:15px;
#calc
{
width:250px;
border:5px solid black;
border-radius:3px;
padding:20px;
margin:auto;
</style>
</head>
<body>
<h1>Calculator program in JavaScript</h1>
30
<divclass="formstyle">
<form name="form1">
<input id="calc" type="text" name="answer"><br><br>
<input type="button" value="1" onclick="[Link]+='1'">
<input type="button" value="2" onclick="[Link]+='2'">
<input type="button" value="3" onclick="[Link]+='3'">
<input type="button" value="+" onclick="[Link]+='+'">
<br><br>
<input type="button" value="4" onclick="[Link]+='4'">
<input type="button" value="5" onclick="[Link]+='5'">
<input type="button" value="6" onclick="[Link]+='6'">
<input type="button" value="-" onclick="[Link]+='-'">
<br><br>
<input type="button" value="7" onclick="[Link]+='7'">
<input type="button" value="8" onclick="[Link]+='8'">
<input type="button" value="9" onclick="[Link]+='9'">
<input type="button" value="*" onclick="[Link]+='*'">
<br><br>
<input type="button" value="/"onclick="[Link]+='/'">
<input type="button" value="0"onclick="[Link]+='0'">
<input type="button" value="."onclick="[Link]+='.'">
<input type="button" value="="
onclick="[Link]=eval([Link])"> <br>
<input type="button" value="ClearAll"
31
onclick="[Link]=''"id="clear”>
<br>
</form>
</div>
</body>
</html>
32
OUTPUT:
33
RESULT:
Hence, the program has been executed and verified successfully.
34
EX NO: 06 JAVASCRIPT PROGRAM TO SCROLL THE NAME IN
DATE: THE SCROLLBAR
AIM:
To write a Javascript program for developing a scrollbar.
ALGORITHM:
STEP1:Open notepad.
STEP2:Type the program.
STEP3:Save the program with [Link].
STEP4:Run a program in the browser.
35
PROGRAM:
<html>
<head>
<style>
#para
{
width: 250px;
height: 150px;
overflow: scroll;
border:1px solid red;
font-size:25px;
}
</style>
</head>
<body>
<h1>IslamiahWomen's Arts and Science College,Vaniyambadi</h1>
<h2>Scroll the bordered text to see the effect.</h2>
<p>The program for<b>on scroll</b>attribute. </p>
<p id = "para" onscroll = "fun()"> Hi, Welcome to the IWASC. Our objective is to
provide quality education to rural children that empower the students to have a
sound career, competent to urban students and to inculcate cultured personality.
</p>
<script>
36
function fun()
{[Link]("para").[Link]="red";
[Link]("para").[Link]="lightgreen";
</script>
</body>
</html>
37
OUTPUT:
38
RESULT:
Hence, the program has been executed and verified successfully.
39
EX NO: 07 MESSAGE PASSING MECHANISM BETWEEN PAGES
DATE:
AIM:
To write a php program for message passing mechanism between pages.
ALGORITHM:
[Link]
STEP1:Open notepad.
STEP 2:Type the program and save the program with .html in htdocs directory/
folder.
[Link]:
STEP 3:Type the program and save the program with .php in htdocs folder.
STEP 4: Activate xamp control panel and start apache and my SQL server.
STEP5:Run the program in the browser.
40
[Link]:
<html>
<body><h1><center>MESSAGEPASSINGMECHANISMBETWEEN
PAGES</center></h1>
<form action="[Link]" method="post">
Name:<input type="text" name="fname"/>
<br><br><br>Age:<inputtype="text" name="age"/>
<br><br><br>
<input type="submit"/><br><br><br>
</form>
</body>
</html>
[Link]:
<html>
<body>
welcome
<?php
echo$_POST["fname"];?>!<br/>youare
<?php echo$_POST["age"];?>yearsold.
</body>
</html>
41
OUTPUT:
42
RESULT:
Hence, the program has been executed and verified successfully.
43
EX NO: 08 APPLICATION FOR EMAIL REGISTRATION
DATE: AND LOGIN USING PHP AND MYSQL
AIM:
To write a PHP program for application of email registration and login using PHP
and MYSQL.
ALGORITHM:
STEP1: Activate the xamp control panel and start Apache and mysql server.
STEP2: Click on mysql admin and click on create database menu then type name of the
database.
STEP3: Create a new table in a database.
STEP4: Open notepad, type the program and save a file with [Link] in the htdocs
folder.
STEP5: Type all the program and save the file with [Link] in htdocs folder.
STEP6: Run the program in the xamp server.
44
PROGRAM:
[Link]
<?php
localhost then set empty.
$con = mysqli_connect("localhost","root","root","login");
if (mysqli_connect_errno()){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>
auth_session.php
<?php
session_start();
if(!isset($_SESSION["username"])) {
header("Location: [Link]");
exit();
}
?>
[Link]
<html>
<head>
<meta charset="utf-8"/>
<title>Registration</title>
</head>
<body>
<?php
require('[Link]');
// When form submitted, insert values into the database.
if (isset($_REQUEST['username'])) {
$username = stripslashes($_REQUEST['username']);
$username = mysqli_real_escape_string($con, $username);
45
$email = stripslashes($_REQUEST['email']);
$email = mysqli_real_escape_string($con, $email);
$password = stripslashes($_REQUEST['password']);
$password = mysqli_real_escape_string($con, $password);
$create_datetime = date("Y-m-d H:i:s");
$query = "INSERT into `users` (username, password, email, create_datetime)
VALUES ('$username', '" . md5($password) . "', '$email',
'$create_datetime')";
$result = mysqli_query($con, $query);
if ($result) {
echo "<div class='form'>
<h3>You are registered successfully.</h3><br/>
<p class='link'>Click here to <a href='[Link]'>Login</a></p>
</div>";
} else {
echo "<div class='form'>
<h3>Required fields are missing.</h3><br/>
<p class='link'>Click here to <a href='[Link]'>registration</a>
again.</p>
</div>";
}
} else {
?>
<form class="form" action="" method="post">
<h1 class="login-title">Registration</h1>
<input type="text" class="login-input" name="username" placeholder="Username"
required />
<input type="text" class="login-input" name="email" placeholder="Email
Adress">
<input type="password" class="login-input" name="password"
placeholder="Password">
<input type="submit" name="submit" value="Register" class="login-button">
<p class="link"><a href="[Link]">Click to Login</a></p>
</form>
<?php
}
?>
</body>
</html>
46
[Link]
<html>
<head>
<meta charset="utf-8"/>
<title>Login</title>
<link rel="stylesheet" href="[Link]"/>
</head>
<body>
<?php
require('[Link]');
session_start();
if (isset($_POST['username'])) {
$username = stripslashes($_REQUEST['username']); // removes backslashes
$username = mysqli_real_escape_string($con, $username);
$password = stripslashes($_REQUEST['password']);
$password = mysqli_real_escape_string($con, $password);
$query = "SELECT * FROM `users` WHERE username='$username'
AND password='" . md5($password) . "'";
$result = mysqli_query($con, $query) or die(mysql_error());
$rows = mysqli_num_rows($result);
if ($rows == 1) {
$_SESSION['username'] = $username;
header("Location: [Link]");
} else {
echo "<div class='form'>
<h3>Incorrect Username/password.</h3><br/>
<p class='link'>Click here to <a href='[Link]'>Login</a> again.</p>
</div>";
}
} else {
?>
<form class="form" method="post" name="login">
<h1 class="login-title">Login</h1>
<input type="text" class="login-input" name="username" placeholder="Username"
autofocus="true"/>
<input type="password" class="login-input" name="password"
placeholder="Password"/>
<input type="submit" value="Login" name="submit" class="login-button"/>
<p class="link"><a href="[Link]">New Registration</a></p>
</form>
47
<?php
}
?>
</body>
</html>
[Link]
<?php
session_start();
if(session_destroy()) {
header("Location: [Link]");
}
?>
[Link]
<?php
include("auth_session.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dashboard - Client area</title>
<link rel="stylesheet" href="[Link]" />
</head>
<body>
<div class="form">
<p>Hey, <?php echo $_SESSION['username']; ?>!</p>
<p>You are now user dashboard page.</p>
<p><a href="[Link]">Logout</a></p>
</div>
</body>
</html>
48
OUTPUT:
49
RESULT:
Hence, the PHP program for application of email registration and login using
PHP and MYSQL and the result has been verified.
50
EX NO: 09 CREATE A FILE AND WRITE THE DATA INTO IT USING PHP
DATE:
AIM:
To write a PHP program to create a file and write the data into it using php.
ALGORITHM:
STEP1:Activate the xamp control panel and start Apache server.
STEP2:Click on apache admin.
STEP3:Open notepad, type the program and save a file with file. Php in the
htdocs folder.
STEP4:Run the program in the browser.
51
PROGRAM:
[Link]
<html>
<head>
<title>PHP file create and write example</title>
</head>
<body>
<form method="POST">
Enter String:<input type="text" name="name"><br/>
<br/>
<input type="submit" name="Submit" Value="Write File">
</form>
<?php
if(isset($_POST['Submit']))
{
$myfile=fopen("[Link]","a");
$text=$_POST["name"];
fwrite($myfile,$text);
fclose($myfile);
}
?>
</body>
</html>
52
OUTPUT:
53
54
RESULT:
Hence, the program has been executed and verified successfully
55
EX NO: 10 PROGRAM TO PERFORM STRING OPERATIONS
DATE: USING PERL
AIM:
To write a program to perform string operations using perl.
ALGORITHM:
STEP1:Open parade perl ide.
STEP2:Write a program in the parade perl ide.
STEP3:Save the program [Link]
STEP4:Run the program
56
PROGRAM:
#!/usr/bin/perl
use5.010;
use strict;
use warnings;
my$msg1="Welcome to OSS lab.";
my$msg2="This is a string operations using perl.";
print$msg1."".$msg2."\n";
print$msg1,"",$msg2,"\n";
print"$msg1$msg2\n";
#!/usr/bin/perl
use5.010;
my$user='Ana';
print 'Hello $user, welcome at our site.\n';
print"\n";
my $user='Ana';
my$day="today";
print "Hello $user, welcome at our site $day.\n";
57
OUTPUT:
58
RESULT:
Hence, the program has been executed and verified successfully.
59