Professional Documents
Culture Documents
Page
Ex.No. Date Title Signature
no.
AIM:
PROCEDURE:
STEP 2 : Create and store a web page for book store as bookstore.html
STEP 4: Create login register, catalog creation and html pages independently
1.Book store.html
<html>
<frameset rows="18%,*">
<frame src="topframe.html" scrolling="no"/>
<frameset cols="15%,*">
<frame src="leftframe.html" noresize/>
<frame src="rightframe.html" name="rframe"/>
</frameset>
</frameset></html>
RightFrame.html
<html>
<head><title>Right Frame</title></head>
<body bgcolor="pink"><h1>Welcome to Online Book Shopping</h1>
</body></html>
Login.html
<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>
LeftFrame.html
<html>
<head><title>Left Frame</title></head>
<body bgcolor=”#ffffcc”>
<center><h4><a href="cst.html" target="rframe">Computer Applications</a></h4>
<h4><a href="commerce.html" target="rframe">Commerce</a></h4>
<h4><a href="maths.html" target="rframe">Mathematics</a></h4>
<h4><a href="it.html" target="rframe">IT</a></h4></center>
</body></html>
Cart.html
<html>
<head><title>Cart Page</title></head>
<body><center><table width="100%">
<tr><th>Book Name</th>
<th>Price</th>
<th>Quantity</th>
<th>Amount</th></tr>
<tr><td align="center">Java Programming</td>
<td align="center">Rs.150</td>
<td align="center">01</td>
<td align="center">Rs.150</td></tr>
<tr><td align="center">Internet and its Applications</td>
<td align="center">Rs.140</td>
<td align="center">02</td>
<td align="center">Rs.280</td></tr>
<tr><th>Total Amount</th>
<td align="center">Rs.430</td></tr>
</table></center>
</body></html>
Commerce.html
<html>
<head><title>Commerce</title></head>
<body bgcolor="cyan">
Book List<br>
Management Accounting<br>
Corporate Accounting<br>
Financial Accounting<br>
Industrial Organizations<br>
Principles of Marketing<br>
</body></html>
BCA.html
<html>
<head><title>Computer Applications</title></head>
<body bgcolor="cyan">
Book List<br>
Internet and its Applications<br>
Data Mining<br>
Cryptography<br>
Microprocessors and its Applications<br>
Programming in C++ and Data Structure<br>
Digital Logic and Microprocessor<br>
</body></html>
IT.html
<html>
<head><title>Information Technology</title></head>
<body bgcolor="cyan">
Book List<br>
Data Minig<br>
Network Security and Cryptography<br>
Mobile Computing<br>
Open Source Software<br>
</body></html>
Maths.html
<html>
<head><title>Mathematics</title></head>
<body bgcolor="cyan">
Book List<br>
Mathematical Foundations<br>
Business Statistics<br>
Operation Research<br>
Graph Theory<br>
Discrete Mathematics<br>
Mechanics<br></body></html>
Register.html
<html>
<head><title>Register New User!</title></head>
<body><form><center><h1><font size="3">Registration Form</font></h1>
<hr width="50%">
<pre>
User Name :<input type="text" maxlength=15 size=25/>
Password :<input type="password" maxlength=15 size=25/>
Confirm Password :<input type="password" maxlength=15 size=25/>
Gender : <input type="radio" name="a">Male</input><input type="radio"
name="a">Female</input>
Email-ID :<input type="text" maxlength=15 size=25/>
Address :<textarea rows=5 cols=30></textarea>
<input type="submit" value="Submit"/>
<input type="reset" value="Reset"/>
</pre></form>
</body></html>
TopFrame.html
<html>
<head><title>Top Frame</title></head>
<body bgcolor=#bbffbb>
<table border="1" width="100%">
<tr><th width="14%"><img src="shop.jpg" width=100 height=50/></th>
<th>Online Book Shopping</th></tr>
</table>
<table border="1" width="100%">
<tr><th><a href="rightframe.html" target="rframe">Home</a></th>
<th><a href="login.html" target="rframe">Login</a></th>
<th><a href="register.html" target="rframe">Register</a></th>
<th><a href="catalogue.html" target="rframe">Catalogue</a></th>
<th><a href="cart.html" target="rframe">Cart</a></th></tr>
</table></body></html>
OUTPUT:
Book Java Progr
Author P Rizwan Ahmed Rs 150
Moharam Pub£cation,Chennai.
AIM :
PROCEDURE :
STEP 3 : Create the html document as main text to display the content
STEP 4 : Access the external style sheet from document by using < link > stage
with in <head> section
STEP 6 : Use the internal style sheet to apply the CSS sheet of particular content
STEP 7 : Use the inline style sheet to apply the style of web page content
STEP 9 : Properly save the html file and run the document in any web browser
<html>
<head>
<h1><center>ALL STYLE SHEETS</center></h1>
<title>USE of INTERNAL and EXTERNAL STYLESHEETS</title>
<link rel="stylesheet" href="xys.css" type="text/css">
<style type="text/css">
.vid
{
font-family:verdana;
font-style:italic;
color:red;
text-align:center;
}
.ani
{
font-family:tahoma;
font-style:italic;
font-size:20;
text-align:center;
}
font
{
font-family:georgia;
color:blue;
font-size:20;
}
ul
{
list-style-type:circle;
}
</style>
</head>
<body>
<ol style="list-style-type:lower-alpha">
<b>SRI LAKSHMI COLLEGE OF ARTS AND SCIENCE BANGARAM .</b>
<br><br><br>
<li>Department of Computer Applications
<li>Department of Computer Science
<li>Department of Information System Management
<li>PG Department of Information Technology
<li>PG & Research Department of Computer Science
</ol>
<p style="font-size:20pt;color:purple;text-align:center">SIRAJUDEEN, Asst.Professor &
Head</p>
<p class="ani">SRI LAKSHMI BANGARAM 606213<br>
Affiliated to Thiruvalluvar University,Vellore-632 115.<br>
</p>
<h2 class="vid">Self Management College </h2> <br>
<font>
<h2>List of Courses Offered </h2>
<ul>
<li>B.A English</li>
<li>BBA</li>
<li>BCA
<li>BCOM
<li>B.Sc., CS.</li>
<li>B.SC., Chemistry.</li>
<li>B.Sc., Maths.</li>
<li>B.Sc., Physics.</li>
</ul>
</font>
<h3>RESULT OF BCA STUDENTS</h3>
<table width="100%" cellspacing="2" cellpadding="2" border="5">
<tr>
<th>STU.NAME</th>
<th>MARKS</th>
<th>RESULTS</th>
</tr>
<tr>
<td align="center">Ramya</td>
<td align="center">100</td>
<td align="center">PASS</td>
</tr>
<tr>
<td align="center">Sarath</td>
<td align="center">99</td>
<td align="center">PASS</td>
</tr>
<tr>
<td align="center">Janani</td>
<td align="center">98</td>
<td align="center">PASS</td>
</tr>
</table>
</body>
</html>
OUTPUT:
RESULT :
DATE:
AIM:
PROCEDURE:
STEP 3: As these are two models in Vi editor namely 1) common mode 2) insert
mode process Esc key for default mode insert mode and type text
Factorial is = 120
RESULT :
Thus the Shell program using LINUX was successfully created and
executed.
EX.NO: 4 SHELL PROGRAM FOR CHECKING WHETHER A GIVEN
STRING IS PALINDROME OR NOT
DATE:
AIM:
PROCEDURE:
STEP 3 : Read the input from user and find the length of the string
STEP 5 : The string is palindrome display the given string is palindrome else the
given string is not palindrome
clear
echo "Enter a string"
read str1
str2=`rev<<<$str1`
if [$str1 = $str2 ]
then
echo "The string is palindrome"
else
echo "The string is not palindrome"
fi
OUTPUT:
Thus the Shell program using LINUX was successfully created and
executed.
EX.NO: 5 CREATE A SIMPLE CALCULATOR IN JAVASCRIPT
DATE:
AIM :
PROCEDURE :
STEP 4 : declare the java script variable define java script function for
calculation
STEP 6 : call the java script function to manipulate each button using click
function
<html>
<head><title>Calculator</title>
<script language="javascript">
var inputstring=""
function updatestring(value)
{
inputstring=inputstring+value;
document.calculator.input.value=inputstring;
}</script></head>
<body bgcolor="black"><form name="calculator">
<table border=5 bordercolor=pink bgcolor="#ffffcc">
<tr><td><input type="text" name="input" maxlength=15 size=27><br/>
<input type="button" value="clear" onclick="input.value='';inputstring=''">
<input type="button" value="mod" onclick="updatestring('%')">
<input type="button" value="*" onclick="updatestring('*')"><br/>
<input type="button" value="7" onclick="updatestring('7')">
<input type="button" value="8" onclick="updatestring('8')">
<input type="button" value="9" onclick="updatestring('9')">
<input type="button" value="/" onclick="updatestring('/')"><br/>
<input type="button" value="4" onclick="updatestring('4')">
<input type="button" value="5" onclick="updatestring('5')">
<input type="button" value="6" onclick="updatestring('6')">
<input type="button" value="-" onclick="updatestring('-')"><br/>
<input type="button" value="1" onclick="updatestring('1')">
<input type="button" value="2" onclick="updatestring('2')">
<input type="button" value="3" onclick="updatestring('3')">
<input type="button" value="+" onclick="updatestring('+')"><br/>
<input type="button" value="0" onclick="updatestring('0')">
<input type="button" value="00" onclick="updatestring('00')">
<input type="button" value="." onclick="updatestring('.')">
<input type="button" value="=" onclick="input.value=eval(inputstring);">
</td>
</tr>
</body>
</html>
OUTPUT:
RESULT :
AIM:
PROCEDURE:
STEP4: Create text area to display your name while scrolling the scroll bar
<html>
<head><title>Scroll Your Name</title>
<script language="javascript">
document.write('<style type="text/css">');
document.write("#textarea {");
document.write("background-color :#009999;");
document.write("SCROLLBAR-HIGHLIGHT-COLOR:#000099");
document.write("SCROLLBAR-SHADOW-COLOR:#3366CC");
document.write("SCROLLBAR-ARROW-COLOR:#000099");
document.write("SCROLLBAR-TRACK-COLOR:#000099");
document.write("SCROLLBAR-DARKSHADOW-COLOR:#000099");
document.write("SCROLLBAR-BASE-COLOR:#000099");
document.write("}");
document.write("</style>");
</script>
</head>
<body>
<textarea id="textarea" roes="10" cols="30">
WELCOME TO SRI LAKSHMI COLLEGE
WELCOME TO SRI LAKSHMI COLLEGE
WELCOME TO SRI LAKSHMI COLLEGE
WELCOME TO SRI LAKSHMI COLLEGE
WELCOME TO SRI LAKSHMI COLLEGE
WELCOME TO SRI LAKSHMI COLLEGE
WELCOME TO SRI LAKSHMI COLLEGE
WELCOME TO SRI LAKSHMI COLLEGE
</textarea>
</body>
</html>
OUTPUT:
AIM:
PROCEDURE :
STEP3: Create a two text box as and get values from keyboard
<html>
<head><title>Favorite!</title></head>
<?php
$YourName=$_REQUEST['YourName'];
$FavoriteWord=$_REQUEST['FavoriteWord'];
?>
<body bgcolor="#FFFFF" text="#000000">
<p>Hi
<?php
print $YourName;
?>
<p>You like the word <b>
<?php
print $FavoriteWord;
?>
!?! </b>
</body>
</html>
Form.html
<html>
<head><title>My Form</title></head>
<body>
<form action="favorite.php" method=post>
My Name is :<br>
<input type="text" name="YourName">
My Favorite Dirty Word is :<br/>
<input type="text" name="FavoriteWord">
<input type="submit" name="submit" value="That's Right!">
</form> </body> </html>
OUTPUT:
RESULT :
AIM:
To develop a program and check file system function date and time
function
PROCEDURE:
STEP3: Create a PHP file named file system function and access in from html
document
<?php
echo("<h3>Result with date():</h3><br/>");
echo("<br><br>".date("1")."</b><br/>");
echo("<br><b>".date("1 dS \of F Y h:i:s A"). "</b><br/>");
echo("<br><b>".date(1 dS F Y")."</b><br/>");
echo("<h3>Oct 3,1975 was on a ".date("1",mktime(0,0,0,10,3,1975))."</h3><br/>");
echo("<h3>Result With gmdate():</h3><br/>");
echo("<br><b>".gmdate("1")."</b><br/>");
echo("<br><b>".gmdate("1 dS \of F Y h:i:s A")."</b><br/>");
echo("<h3>Oct 3,1975 was on a</h3><b>".gmdate("1",mktime(0,0,0,10,3,1975))."</b><br/>");
echo("<br><b>TIME".yime()."</b><br/>");
?>
Getmethod.html
<html>
<head>
<title>Welcome to Sri Laskhmi College of Arts and Science</title>
</head>
<body>
UG Courses Offered :
B.A English
B.C.A
B.Sc., Maths
B.Sc., Physics
B.Sc., Chemistry
B.B.A
B.COM
B.Sc., CS
PG Courses Offered :
M.A English
M.Sc., CS
M.Sc., Maths
</body></html>
FileSysfun.php
<html>
<head>
<title>Open a File</title>
</head>
<body bgcolor="lavender">
<pre>
<?php
$filename="getmethod.html";
$fh=fopen("$filename","r");
while(!feof($fh))
{
$content=fgets($fh);
echo $content;
}
fclose($fh);
?>
</pre>
</body>
</html>
OUTPUT:
1.
2.
Result with date0:
Ot3l975wzsogal
1
1 17th of February 2017 08:10:30 LA'I
Ot3l975wzsoga
1
T£!YfE1487319030
RESULT :
AIM:
PROCEDURE:
STEP4: Write the PHP code for insert, delete and update student records
STEP5: Add or insert the student details, edit and delete web page
<?php>\$ n=mysql_conect(“lochalhost”,””);
Mysql_select_db(“test_db”,$cn);
?>
<html>
<head>
<tite>
Database sample application</tiltle>
</head>
<body>
<h1 align=”center”>Student database application</h1>
<hr size=”3” color=”#ff0000”/>
<?php
F(isset($_REQUEST[„sub‟])))//for insert
{
Mysql_query(“insert into student(s_id,s_name,s_age)
Values(NULL,””.$REQUEST[„txtxnmae‟].”,”.$_RESQUEST[„txtage‟].””)”);
Header(“location:index.php”);
}
If (iset($_RESUEST[„did‟]))/for delete
{
Mysql_query(“delete from student where bs_id=”‟.$_REQUEST[„did‟].””);
Header(“location:index.php”);
}
{
If (isset($_REQUEST[„eid]]))/for update
{
$query_fetch=mysql_query(“select * from stu7dent where s_id=”‟.$_REQUEST[„eid‟].””);
%rs_stud=mysql_fecth_object($query_fetch);
}
If (isset($REQUEST[„update‟]))
{
Mysql_query(“update student set
S_name=”‟.$REQUEST[„txtname‟].,s_age=”‟.$_REQUEST[„txtage‟]”
Where s_id=”.$_REQUEST[„txtid])or die(mysql_erroe());
Header(“location:index.php”);
}
?>
<from method="post">
<table align="center">
<tr>
<td>Name</td>
<td><input type="textr"name="txtname"
value="<?php echo $rs_stud->s_name;?>"/></td>
</tr>
<tr>
<td>Age</td>
<td><input type="text"name="txtag"value="<?php echo $rs_stud>s_age;?>"/></td>
</tr>
<tr>
<td></td>
<td><input type="submit"name="sub"value="add"/><input
type="submit"name="update"/></td>
</tr><input type="hidden"name="txtid"value="<?php echo $rs_stud>s_id;?>"/><!--used to
update record-->
</table>
<table align="center">
<tr bgcolor="#cccccc">
<td>name</td>
<td>age</td>
<td></td>
<td></td>
</tr>
<?php
$query=mysql_query("select * from student");
while($rs=mysql_fetch_object($query))
{
?>
<tr>
<td>?php echo $rs->s_name;?></td>
<td>?php echo $rs->s_age;?></td>
<td>a href="index.php?eid=<?php echo $rs->s_id;?>'>edit</a></td>
<td>a href="index.php?did=<?php echo $rs-
>s_id;?>">Delete</a></rd>
</tr>
<?php
}
?>
</table>
</form>
</body>
</html>
OUTPUT:
RESULT :
DATE:
AIM:
PROCEDURE:
<?php
session_start();
?>
<?php
$inTwoMoths=60*60*24*60+time();
setcookie('lastVisit',date("G:i-m/d/y"),$inTwoMonths);
if(isset($_COOKIE['lastVisit']))
{
$visit=$_COOKIE['lastVisit'];
echo "Your last visit was -".$visit;
}
else
echo "You've got some stale cookies!";
?>
<html>
<head><title>Sessions</title></head>
<body bgcolor="lavendor">
<font size=1 face="arial">
<h2>Tracking Visitors with Sessions</h2>
<?php
if(!isset($_SESSION))
{
$_SESSION[visitor_count]=0;
}
else
{
$_SESSION[visitor_count]++;
}
echo "You are visitor number ",$_SESSION['visitor_count'],".<br/>";
echo "The session id is : ",session_id();
?>
</font>
</body>
</html>
Main.html
<html>
<head>
<title>Cookies</title>
</head>
<body>
<form action="Cookies.php" method="post">
<p>
the last visited time was
<input type="submit" name="Display Now"/>
</p> </form> </body> </html>
OUTPUT:
Before refresh:
After refresh:
RESULT :