Program 1: Develop & Demonstrate A XHTML Document That Illustrates The Use of External Style Sheet, Ordered List, Table, Borders, Padding, Color & The Tag. m1.html

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 26

Program 1: Develop & demonstrate a XHTML document that illustrates the use of external style

sheet, ordered list, table, borders, padding, color & the <span> tag.

m1.html

<HTML>
<HEAD>
<TITLE>FIRST LAB PROG</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="mstyle.css">
</HEAD>
<BODY BGCOLOR="purple">
<CENTER><H1>WELCOME TO WEB PROGRAMMING LAB<H1></CENTER>
<CAPTION><B><U>Fruits & Vegetables</U></B></CAPTION>
<OL>
<LI>Fruits</LI>
<OL>
<LI>Apple</LI>
<LI>Banana</LI>
<LI>Strawberry</LI>
</OL>
<LI>Vegetables</LI>
<OL>
<LI>Carrot</LI>
<LI>Tomato</LI>
<LI>Drumstick</LI>
</OL>
</OL>

<center>
<TABLE BORDER="2">
<TR>
<TH CLASS="COLOR1">SUBJECT</TH>
<TH CLASS="COLOR1">LECTURERS</TH>
</TR>
<TR>
<TD>JAVA & J2EE</TD>
<TD>Sashidhar</TD>
</TR>
<TR>
<TD>OOMD</TD>
<TD>Muquitha Almas</TD>
</TR>

</TABLE>
</center>
<P>Sure u will get lot of <SPAN CLASS="DEMO">FUN</SPAN> in Web Programming Lab</P>
<P CLASS="ONE">In this lab you will learn XHTML,CSS, JAVASCRIPT, PERL & PHP</P>
<P CLASS="TWO">XHTML, CSS, JAVASCRIPT are used as<SPAN CLASS="DEMO">Client
Side</SPAN>Programming</P>
<P CLASS="THREE">PERL & PHP are used as <SPAN CLASS="DEMO">Server
side</SPAN>Programming</P>
</BODY>
</HTML>

mstyle.css

ol{list-style-type:upper-roman;}
ol ol{list-style-type:upper-alpha;}
table{border-top-width:medium;
border-top-color:red;
border-bottom-style:dashed;}

th.COLOR1{color:green;}

h1{border-style:dashed;
border-width:thin;
border-color:green;}

p.ONE{margin:0.2in;
padding :0.2in;
background-color:#CC00AA;
border-style:solid;}

p.TWO{margin:0.1in;
padding:0.1in;
background-color:brown;
border-style:solid;
}

p.THREE{margin:0.6in;
background-color:yellow;
}

span.DEMO{color:blue;
background-color:cyan;
font-size:29pt;
font-style:italic;
font-weight:bold;
}
Program 2a: Develop & demonstrate a XHTML document that includes Java script for the
following problem. Input: A number n obtained using prompt

Output: The first n Fibonacci numbers.

m2.html

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<script type="text/javascript">
var fib1=0,fib2=1,fib=0;
var num=prompt("Enter a number:\n"," ");
if(num!=null && num>0)
{
document.write(num+" fibonacci series"+"<br>");

if(num==1)
document.write(" "+fib1+"<br>");
else
document.write(fib1+"<br>"+fib2+"<br>");
for(i=3;i<=num;i++)
{
fib=fib1+fib2;
document.write(" "+fib+"<br>");
fib1=fib2;
fib2=fib;
}
}
else
alert("invalid input");
</script>
</body>
</html>

Program 2b: Develop & demonstrate a XHTML document that includes Java script for the
following problem. Input: A number n obtained using prompt.
Output: A table of numbers from 1 to n & their squares using alert.

m2b.html

<html xmlns="http://www.w3.org/1999/XHTML">
<body>
<script type="text/javascript">
var num=prompt("enter a number:\n"," ");
if(num>0 && num!=null)
{
msgstr="number and its square\n";
for(i=1;i<=num;i++)
{
msgstr=msgstr+i+"--"+i*i+"\n";
}
alert(msgstr);
}
else
alert("no proper input");
</script>
</body>
</html>

Program 3a: Develop & demonstrate a XHTML document that includes Java script that uses
functions for the following problem. Parameter: A string
Output: The position in the string of the leftmost vowel.
m3a.html

<html xmlns = "http://www.w3.org/1999/xhtml">

<head><title>Lab3a</title>

<script type="text/javascript">

function findpos()

var str=prompt("Enter the String:","");

var pos=str.search(/a|e|i|o|u|A|E|I|O|U/);

var len=str.length;

alert("length of the string is:"+len);

if(pos >= 0)

alert("Position of the leftmost vowel is" +pos);

else

alert("vowel is not found ");

</script></head>
<body bgcolor="lightgreen">

<center> Click here to enter the String : <input type="submit" value="CLICK!"


onClick="findpos()" />

</center>

</body>

</html>

Program 3b: Develop & demonstrate a XHTML document that includes Java script that uses
functions for the following problem. Parameter: A number.
Output: The number with its digits in the reverse order.

m3b.html

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>3bprogram</title>
<script type="text/javascript">
function disp(num)
{
var alphaexp=/^[0-9]+$/;
if(!num.value.match(alphaexp))
{
alert("input should be a positive number");
return false;
}
var r,rn=0,n=Number(num.value);
while(n!=0)
{
r=n%10;
n=Math.floor(n/10);
rn=rn*10+r;
}
alert("The "+num.value+" in reverse is "+rn);
}
</script>
</head>
<body>
<form>
<label> Enter a num: <input type="text" id="number"/></label>
<br/>
<input type="button" value="click" onclick="disp(document.getElementById('number'))"/>
</form>
</body>
</html>
Program 4a: Develop & demonstrate using Java script a XHTML document that collects the
USN(valid format: A digit from 1 to 4 followed by 2 uppercase characters followed by 2 digits
followed by 2 uppercase characters followed by 3 digits; no embedded spaces allowed) of the user.
Event handler must be included for the form element that collects this information to validate the
input. Messages in the alert windows must be produced when errors are detected.

M4a.html

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<script type="text/javascript">

function isNumeric(elem)

var NumExp=/[1-9][A-Z][A-Z][0-9][0-9][A-Z][A-Z][0-9][0-9][0-9]/;

var str=elem.value;

if(str.length!=10)

alert("please enter valid usn");

elem.focus();

return false;

if(elem.value.match(NumExp))

alert("usn verified");

return true;

else

{
alert("please enter valid usn");

elem.focus();

return false;

</script>

</head>

<body>

<form>

<label> enter usn:

<input type="text" id="number"/></label>

<input type="button" onclick="isNumeric(document.getElementById('number'))" value="check"/>

</form>

</body>

</html>

Program 4b: Modify the above program to get the current semester also (restricted to be a number from 1
to 8).

m4b.html

<hthml xmlns="http://www.w3.org/1999/xhtml">

<head><title>4b Program</title>

<script type="text/javascript">

function formvalidator()

var usn=document.getElementById('req1');

var sem=document.getElementById('req2');
if(iscorrect(usn))

if(isperfect(sem))

return true;

return false;

function isperfect(elem2)

var exp2=/[1-8]/

if(elem2.value.length==0)

alert("Semester number is empty");

elem2.focus();

return false;

else if(!elem2.value.match(exp2))

alert("Invalid Sem number");

elem2.focus();

return false;

alert("Semester number is correct");


return true;

function iscorrect(elem1)

var usn1=/[1-9][A-Z][A-Z][0-9][0-9][A-Z][A-Z][0-9][0-9][0-9]/;

if(elem1.value.length==0)

alert("USN is empty");

elem1.focus();

return false;

else if(!elem1.value.match(usn1))

alert("Invalid USN,Enter correct usn of VTU format");

elem1.focus();

return false;

alert("Valid USN");

return true;

</script>

</head>

<body bgcolor="cyan">

<form onsubmit='return formvalidator()'>


Enter USN: <input type="text" id="req1"> <br/>

Enter Sem: <input type="text" id="req2"> <br/>

<input type="submit" value="check field"/>

</form>

</body>

</html>

Program 5a: Develop & demonstrate using Java script a XHTML document that contain 3 short
paragraphs of text, stacked on top of each other with only enough of each showing so that the
mouse cursor can be placed over some part of them. When the cursor is placed over the exposed
part of any paragraph, it should rise to the top to become completely visible.

m5a.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
var top="stack1";
function move(curr)
{
oldstack = document.getElementById(top).style;
newstack = document.getElementById(curr).style;
oldstack.zIndex = '0';
newstack.zIndex = '10';
top=curr;
}
</script>
<style>
p.one{ padding:30px;
width:200px;position:absolute;
left:100px;top:100px;
z-index:6;background-color:#e0e0e0; -moz-border-radius:30px;
}
p.two{ padding:30px;width:200px;
position:absolute;left:150px;
top:150px;z-index:4;
background-color:#d0d0d0;-moz-border-radius:30px;
}
p.three{ padding:30px; width:200px;
position:absolute;left:200px;
top:200px;z-index:2;
background-color:#a0a0a0;-moz-border-radius:30px;
}
</style>
</head>
<body>
<p class='one' id="stack1" OnMouseOver="move('stack1');">
Paragraph1: Hey this is a sample text and this text we are writing only to make this paragraph look nice.
This is our web programming lab. Thank you.
</p>
<p class='two' id="stack2" OnMouseOver="move('stack2');">
Paragraph2: Hey this is a sample text and this text we are writing only to make this paragraph look nice.
This is our web programming lab. Thank you.
</p>
<p class='three' id="stack3" OnMouseOver="move('stack3');">
Paragraph3: Hey this is a sample text and this text we are writing only to make this paragraph look nice.
This is our web programming lab. Thank you.
</p>
</body>
</html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
var oripos;
var oricol;
function movein(curr)
{
newstack = document.getElementById(curr).style;
oripos = newstack.zIndex;
oricol = newstack.background;
newstack.zIndex = '10';
newstack.background = '#808080';
}
function moveout(curr)
{
document.getElementById(curr).style.zIndex=oripos;
document.getElementById(curr).style.background=oricol;
}
</script>
<style>
p.one{ padding:30px;width:200px;
position:absolute;left:100px;
top:100px;z-index:6;
background-color:#e0e0e0;-moz-border-radius:50px;
}
p.two{ padding:30px;width:200px;
position:absolute;left:150px;
top:150px;z-index:4;
background-color:#d0d0d0;-moz-border-radius:50px;
}
p.three{ padding:30px;width:200px;
position:absolute;left:200px;
top:200px;z-index:2;
background-color:#a0a0a0;-moz-border-radius:50px;
}
</style>
</head>
<body>
<p class='one' id="stack1" OnMouseOver="movein('stack1');" onmouseout="moveout('stack1');">
Paragraph1: Hey this is a sample text and this text we are writing only to make this paragraph look nice.
This is our web programming lab. Thank you.
</p>
<p class='two' id="stack2" OnMouseOver="movein('stack2');" onmouseout="moveout('stack2');">
Paragraph2: Hey this is a sample text and this text we are writing only to make this paragraph look nice.
This is our web programming lab. Thank you.
</p>
<p class='three' id="stack3" OnMouseOver="movein('stack3');" onmouseout="moveout('stack3');">
Paragraph3: Hey this is a sample text and this text we are writing only to make this paragraph look nice.
This is our web programming lab. Thank you.
</p>
</body>
</html>

Program 5b: Modify the above document so that when a paragraph Is moved from the top
stacking position, it returns to its original position rather than to the bottom.

m5b.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
var oripos;
var oricol;
function movein(curr)
{
newstack = document.getElementById(curr).style;
oripos = newstack.zIndex;
oricol = newstack.background;
newstack.zIndex = '10';
newstack.background = '#808080';
}
function moveout(curr)
{
document.getElementById(curr).style.zIndex=oripos;
document.getElementById(curr).style.background=oricol;
}
</script>
<style>
p.one{ padding:30px;width:200px;
position:absolute;left:100px;
top:100px;z-index:6;
background-color:#e0e0e0;-moz-border-radius:50px;
}
p.two{ padding:30px;width:200px;
position:absolute;left:150px;
top:150px;z-index:4;
background-color:#d0d0d0;-moz-border-radius:50px;
}
p.three{ padding:30px;width:200px;
position:absolute;left:200px;
top:200px;z-index:2;
background-color:#a0a0a0;-moz-border-radius:50px;
}
</style>
</head>
<body>
<p class='one' id="stack1" OnMouseOver="movein('stack1');" onmouseout="moveout('stack1');">
Paragraph1: Hey this is a sample text and this text we are writing only to make this paragraph look
nice.
This is our web programming lab. Thank you.
</p>
<p class='two' id="stack2" OnMouseOver="movein('stack2');" onmouseout="moveout('stack2');">
Paragraph2: Hey this is a sample text and this text we are writing only to make this paragraph look
nice.
This is our web programming lab. Thank you.
</p>
<p class='three' id="stack3" OnMouseOver="movein('stack3');" onmouseout="moveout('stack3');">
Paragraph3: Hey this is a sample text and this text we are writing only to make this paragraph look
nice.
This is our web programming lab. Thank you.
</p>
</body>
</html>

Program 6a: Design an XML document to store information about a student in an engineering
college affiliated to VTU. The information must include USN, Name, Name of the College,
Branch, Year of Joining & e-mail id. Make up sample data for 3 students. Create a CSS style
sheet & use it to display the document.

m6a.xml

<?xml-stylesheet href="m6a.css" type="text/css"?>

<vtu>

<student>

<name>Basavaraj Metri</name>

<usn>1ds08is404</usn>

<collegeName>dayananad sagar</collegeName>

<branch>info science</branch>

<year>2008</year>
<email>[email protected]</email>

</student>

<student>

<name>Manjayya C C</name>

<usn>1ds06is045</usn>

<collegeName>dayanand sagar</collegeName>

<branch>info science</branch>

<year>2006</year>

<email>[email protected]</email>

</student>

<student>

<name>mohan kumar</name>

<usn>1ds05is067</usn>

<collegeName>dayanand sagar</collegeName>

<branch>comp science</branch>

<year>2005</year>

<email>[email protected]</email>

</student>

</vtu>

m6a.css

student { clear:both; float:left; font-size:18pt }

name { background:red; color:white; font-size:18pt }


usn { color:red; font-size:18pt }

collegeName { background: lime; color:yellow; font-size:18pt }

branch { color:orange; text-align:right; font-size:18pt }

year { background: red; color:yellow; font-size:18pt }

email { color:blue; font-size:18pt }

Program 6b: Create an XSLT style sheet for one student element of the above document & use it
to create a display of that element.

m6b.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<?xml-stylesheet href="m6b.xsl" type="text/xsl"?>

<vtu>

<student>

<name>Basavaraj Metri</name>

<usn>1DS08IS404</usn>

<branch>Info Science</branch>

<college>DSCE</college>

</student>

<br />

<student>

<name>Manjayya C C</name>

<usn>1DS06IS067</usn>

<branch>Info Science</branch>

<college>DSCE</college>

</student>
<br />

<student>

<name>Charan Krishnan</name>

<usn>1DS05CS017</usn>

<branch>Comp Science</branch>

<college>DSCE</college>

</student>

</vtu>

m6b.xsl

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<html>

<body>

<h1>INFORMATION</h1>

<table border="2">

<tr><th>NAME</th><th>USN</th><th>BRANCH</th><th>COLLEGE</th></tr>

<xsl:for-each select="vtu/student">

<xsl:choose>

<xsl:when test="name='Basavaraj Metri'">

<tr bgcolor="red">

<td><xsl:value-of select='name' /></td>

<td><xsl:value-of select='usn' /></td>

<td><xsl:value-of select='branch' /></td>


<td><xsl:value-of select='college' /></td>

</tr>

</xsl:when>

<xsl:otherwise>

<tr>

<td><xsl:value-of select='name' /></td>

<td><xsl:value-of select='usn' /></td>

<td><xsl:value-of select='branch' /></td>

<td><xsl:value-of select='college' /></td>

</tr>

</xsl:otherwise>

</xsl:choose>

</xsl:for-each>

</table>

</body>

</html>

</xsl:template>

</xsl:stylesheet>

Program 7a: Write a Perl program to display various Server Information like Server Name,
Server Software, Server protocol, CGI Revision etc.

#!/usr/bin/perl
use strict;
use CGI ':standard';
print header(),start_html("Server Information");
print "<table border='2' bgcolor='lime' align='center'>";
foreach my $i(sort(keys(%ENV)))
{
print "<tr><td>$i</td> <td>$ENV{$i}</td></tr>";
}
print "</table>";
print end_html();
exit(0);

7 b) Write a Perl program to accept UNIX command from a HTML form and to display the output of the
command executed.
Lab7b.html
<html>
<body>
<form method=post action="cgi-bin/Lab7b.pl">
Enter Command<input type=text name=t1>
<input type=submit>
</form>
</body>
</html>
Lab7b.pl
#!/opt/lampp/bin/perl
use CGI':standard';
print "Content-type: text/html","\n\n";
$c=param('t1');
system($c);
exit(0);

Program 8a: Write a Perl program to accept the User name & display a greeting message
randomly chosen from a list of 4 greeting messages.

M8a.html
<html>

<body>

<form method="post" action="http://localhost/cgi-bin/m8a.pl">

Enter ur name <input type="text" name="name"> <br/>

<input type="submit" value="ClickHere">

</form>

</body>

</html>
M8a.pl

#!/usr/bin/perl

use CGI':standard';

use strict;

my $name=param('name');

my $range=4;

my $randnum=int(rand($range));

print "<h1>"

if($randnum==0)

print "Welcome to web page ";

else if($randnum==1)

print "Welcome to info science";

else if($randnum==2)

print "Thank you for visiting web page ";

else if

print "Please refresh page to get different info";

print "$name </h1>";

exit(0);
Program 9: Write a Perl program to display a digital clock which displays the current time of the server.

#/usr/bin/perl
print "Content-Type:text/html\n\n";
print "<html><head><meta http-equiv=refresh content=1></head>";
$t=localtime(time);
print $t;

Program 10: Write a Perl program to insert name & age information entered by the user into a
table created using MySQL & to display the current contents of this table.

prog10.html

<? xml version="1.0" enoding="UTF-8"?>


<!DOCTYPE html PUBLIC "-//W3W//DTD XHTML1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body bgcolor="#226699" text="#bbcc99">
<h1><center>insert into the database</header></h1>
<form action="http://localhost/cgi-bin/prog10.pl" method="post">
<label>name:<input type="text" name="uname"/></label><br/>
<label>age:<input type="text" name="age"/></label><br/>
<input type="submit" value="submit form"/>
<input type="reset" value="Reset form"/>
</form>
</body>
</html>

prog10.pl

#!/usr/bin/perl
use strict;
use CGI':standard';
use DBI;
print header();
print start_html(-title=>"database",-bgcolor=>"#135ab",-text=>"green");
my $name=param('uname');
my $age=param('age');
my $db=DBI->connect('DBI:mysql:student','root','') or die"cannot connect:".DBI->errstr();
my $query=$db->prepare("insert into stud values('$name','$age')");
$query->execute();
my $query=$db->prepare("select * from stud");
$query->execute();
print "<table border=2>";
while(($name,$age)=$query->fetchrow())
{
print "<tr><td>$name</td><td>$age</td></tr>";
}
$query->finish();
$db->disconnect();
print end_html;
exit(0);

Program 11: Write a PHP program to store current date-time in a COOKIE & display the last
visited on date-time on the web page upon reopening of the same page.

<?php
$expire=60*60*24*60*time();
setcookie('lastvisit',date("h:i:s A -m/d/y"),$expire);
if(isset($_COOKIE['lastvisit']))
{
$visit=$_COOKIE['lastvisit'];
echo "your last visit was".$visit;
}
else
echo "you have an expired cookie";
?>

Program 12: Write a PHP program to store page views count in SESSION to increment the count
on each refresh & to show the count on web page.

<?php
session_start();
if(isset($_SESSION['views']))
$_SESSION['views']+=1;
else
$_SESSION['views']=1;
echo "page views=".$_SESSION['views'];
?>

Program 13: Create a XHTML form with Name, Address Line1, Address Line2 & E-mail text
fields. On submitting, store the values in MySQL table. Retrieve & display the data based on
Name.

M13.html

<html>

<body>

<form action="m13a.php">NAME:<input type="text" name="name1"><br />

add1:<input type="text" name="addr1"><br />

add2:<input type="text" name="addr2"><br />

email:<input type="text" name="emails"><br />

<input type="submit">

</form>
<form action="m13b.php">

Name:<input type="text" name="name"><br />

<input type="submit">

</form>

</body>

</html>

m13a.php (save in html folder)


<?php

mysql_connect("localhost","root","") or die(mysql_error());

mysql_select_db("metri") or die(mysql_error());

$name=$_GET['name1'];

$add1=$_GET['addr1'];

$add2=$_GET['addr2'];

$email=$_GET['emails'];

echo " hello ".$name;

$query="insert into stud13 values('$name','$add1','$add2','$email')";

mysql_query($query) or die(mysql_error());

echo "INSERTED";

?>

m13b.php (Save in html folder)

<?php

mysql_connect("localhost","root","")or die(mysql_error());

mysql_select_db("metri");

$name=$_GET['name'];

$res=mysql_query("select * from stud13 where name='$name'");

echo "<table border='1'>";


while($arr=mysql_fetch_row($res))

echo "<tr><td>$arr[0]</td> <td>$arr[1]</td> <td>$arr[2]</td> <td>$arr[3]</td>";

echo "</table>";

?>

Program 14: Using PHP & MySQL develop a program to accept book information with accession
number, title, authors, edition & publisher from a we page & store the information in a database
& to search for a book with the title specified by the user & to display the search results with
proper headings.

m14.html

<html>

<body>

<h3>Enter the Book information </h3>

<form action="http://localhost/m14a.php" method="post">

Accession Number: <input type="text" name="accno"> <br>

Title: <input type="text" name="title" > <br>

Author: <input type="text" name="author" > <br>

Edition: <input type="text" name="edn" > <br>

Publisher: <input type="text" name="pub" ><br>

<input type="submit" value="Add Entry" >

<input type="reset" value="Reset Entry" >

</form>

</body>

</html>

m14a.php
<html>

<head><title>Result Table</title></head>

<body>

<h3>Resulting table after the insert operation </h3>

<hr>

<?php

$link=mysql_connect("localhost","root","");

mysql_select_db("metri");

$acc=$_POST["accno"];

$title=$_POST["title"];

$author=$_POST["author"];

$edn=$_POST["edn"];

$pub=$_POST["pub"];

$t=mysql_query("INSERT INTO metri14 VALUES('$acc','$title','$author','$edn','$pub')")or


die(mysql_error());

echo "Record Inserted";

$var=mysql_query("SELECT * FROM metri14") or die(mysql_error());

echo"<table border size=1>";

echo"<tr><th>Accession
number</th><th>Title</th><th>Author</th><th>Edition</th><th>Publication</th></tr>";

while ($arr=mysql_fetch_row($var))

echo"<tr><td>$arr[0]</td><td>$arr[1]</td><td>$arr[2]</td><td>$arr[3]</td><td>$arr[4]</td>
</tr>";
}

echo"</table>";

mysql_close($link);

?>

<hr>

<h3>Search a Book in the database</h3>

<form action="http://localhost/msearch.php" action="post">

Search the title:<input type="text" name="title">

<input type="submit" value="search">

</form>

</body>

</html>

msearch.php

<html>

<head><title>Result Table</title></head>

<body>

<h3>Search title from the database </h3>

<hr>

<?php

$link=mysql_connect("localhost","root","");

mysql_select_db("metri");

$title=$_GET["title"];
$var=mysql_query("SELECT * FROM metri14 where title='$title'") or die(mysql_error());

echo"<table border size=1>";

echo"<tr><th>Accession
number</th><th>Title</th><th>Author</th><th>Edition</th><th>Publication</th></tr>";

while ($arr=mysql_fetch_row($var))

echo"<tr><td>$arr[0]</td><td>$arr[1]</td><td>$arr[2]</td><td>$arr[3]</td><td>$arr[4]</td>
</tr>";

echo"</table>";

mysql_close($link);

?>

<hr>

<h3>Click here to get enter the values</h3>

<a href="m14.html">Home</a>

</body>

</html>

You might also like