OSS Record
OSS Record
//first.html
<html>
<head>
<title>FRAMES</title>
</head>
<frameset cols="25%,75%">
<frame src="frames.html">
</frameset>
<noframes></noframes>
</html>
//blank.html
<html>
<head>
<title>WELCOME</title>
</head>
<body background="C:\Users\Admin\Downloads\book.avif">
</body>
</html>
//frames.html
<html>
<head>
<title>FRAMES</title>
</head>
<body bgcolor="Silver">
</br>
</br>
</body>
</html>
//myself.html
<html>
<head>
<title>Welcome Page</title>
</head>
<body bgcolor="Pink">
</br>
</p>
</font>
</body>
</html>
//table.html
<html>
<head>
<body bgcolor="Cyan">
<caption><h1>MY QUALIFICATION</h1></caption>
<tr>
<th>STAND</th>
<th>BOARD</th>
<th>PERCENTAGE</th>
</tr>
<tr align="center">
<td>SSLC</td>
<td>STATE BOARD</td>
<td>87%</td>
</tr>
<tr align="center">
<td>HSLC</td>
<td>STATE BOARD</td>
<td>82%</td>
</tr>
<tr align="center">
<td>BCA</td>
<td>THIRUVALLUVAR</td>
<td>90%</td>
</tr>
</table>
<br/><br/>
</body>
</html>
OUTPUT:
2.CASCADING STYLE SHEET
<html>
<head>
</title>
<style type="text/css">
body
background-color:chocolate; font-family:palatino
address.col{color:red}
h1{color:green}
</style>
</head>
<body>
<h1><center><u>ABOUT MYSELF</u></center></h1>
<h2> MY LIKES</h2>
<li>GOOD BOOKS<br/>
<li>TEMPLES<br/>
<li>CLASSICAL MUSIC<br/></ol>
</p><br/>
<h3> MY HOBBIES</h3>
<li> COOKING.</li>
</ul><p><br/>
<center>
</address>
<address>
<br/>
<a href="mailto:[email protected]">
<h1>THIRD CA</h1></a>
</address> </center>
</body>
</html>
OUTPUT:
3.FACTORIAL
# users=7
<html>
<head>
<style>
input[type="button"] {
width:100%;
padding:5px;
font-weight:bold;
input[type="text"] {
width:93%;
padding:5px;
</style>
<script language="javascript">
function calculate() {
var result;
if (eStr.lastIndexOf('='))
else {
result = eval(eStr);
form1.calc.value += "="+result;
</script>
</head>
<body bgcolor="pink">
<center>
<tr>
</tr>
<tr>
<td><input type = "button" value = "4" onclick = "form1.calc.value += '4'
"/></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr><td colspan="4">
<input type = "button" value = "Clear All" onclick = "form1.calc.value = ' ' "/>
</td></tr>
</table> <br>
</form>
</center>
</body>
</html>
OUTPUT:
6.SCROLLING NAME
<html>
<head>
<title>My Example</title>
<style>
body {
margin-bottom: 200%;
.myBox {
border: none;
padding: 5px;
width: 200px;
height: 200px;
::-webkit-scrollbar {
width: 12px;
height: 12px;
::-webkit-scrollbar-track {
background: gold;
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: yellowgreen;
::-webkit-scrollbar-thumb:hover {
background: #88ba1c;
::-webkit-scrollbar-button {
border-style: solid;
height: 13px;
width: 16px;
::-webkit-scrollbar-button:single-button:vertical:decrement {
::-webkit-scrollbar-button:single-button:vertical:decrement:hover {
::-webkit-scrollbar-button:single-button:vertical:increment {
</style>
</head>
<body bgcolor="DodgerBlue">
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
BCA DEPARTMENT
</textarea>
</body>
</html>
OUTPUT:
7.MESSAGE PASSING
//formpage.html
<html>
<head><title>MyForm</title></head>
<body>
</form>
</body>
</html>
//favorite.php
<html>
<head><title>Perv!</title></head>
<?php
$YourName=$_REQUEST['YourName'];
$FavoriteWord=$_REQUEST['FavoriteWord'];
?>
<body >
<center><br/><br/>
<tr>
<td>
<p><h1>
</h1>
</td>
</tr>
</table>
</center>
</body>
</html>
OUTPUT:
9.FILE CREATION AND WRITE DATA
<html>
<head>
</head>
<body>
<form method="post">
<br/>
</form>
<?php if(isset($_POST['submit1']))
$createFile=fopen("createNew.txt","w");
$text=$_POST['name'];
fwrite($createFile,$text);
fclose($createFile);
?>
</body>
</html>
OUTPUT:
8. EMAIL REGISTRATION AND LOGIN
//config.php
<?php
session_start();
$conn=mysqli_connect("localhost","root","","bcalogin");
?>
//registration.php
<?php
require 'config.php';
if(!empty($_SESSION["id"]))
header("Location: index.php");
if(isset($_POST["submit"]))
$username= $_POST["username"];
$email=$_POST["email"];
$password=$_POST["password"];
$confirmpassword=$_POST["confirmpassword"];
if(mysqli_num_rows($duplicate)>0)
{
echo"<script> alert('Username or Email Has Already Taken'); </script>";
else{
if($password==$confirmpassword)
mysqli_query($conn,$query);
echo"<script>alert('RegistrationSuccessful');</script>";
else
?>
<html>
<head>
<title>Registration</title>
</head>
<body style="background-color:skyblue;">
<h2>Registration</h2>
<br>
<label for="email">Email:</label>
<label for="password">Password:</label>
<label for="confirmpassword">ConfirmPassword:</label>
</form>
<br>
<a href="login.php">Login</a>
</body>
</html>
//login.php
<?php
require 'config1.php';
if(!empty($_SESSION["id"]))
header("Location: index.php");
}
if(isset($_POST["submit"]))
$usernameemail=$_POST["usernameemail"];
$password=$_POST["password"];
$row = mysqli_fetch_assoc($result);
if(mysqli_num_rows($result) > 0)
if($password == $row['password'])
$_SESSION["login"]=true;
$_SESSION["id"]=$row["id"];
header("Location: index.php");
else
else
}
?>
<html>
<head>
<title>Login</title>
</head>
<body style="background-color:pink;">
<h2>Login</h2>
<label for="usernameemail">UsernameorEmail:</label>
<label for="password">Password:</label>
</form><br>
<a href="registration.php">Registration</a></body></html>
//logout.php
<?php
require'config.php';
$_SESSION=[];
session_unset();
session_destroy();
header("Location:login.php");
?>
//index.php
<?php
require 'config.php';
if(!empty($_SESSION["id"])){
$id =$_SESSION["id"];
$row=mysqli_fetch_assoc($result);
else{
header("Location:login.php");
?>
<html>
<head>
<title>Index</title>
</head>
<body style="background-color:HotPink;">
<a href="logout.php">Logout</a></body></html>
OUTPUT:
10.STRING OPERATION
REPETITION
welcomewelcomewelcomewelcomewelcome
SUB STRING()
asmwc
STRING REPLACE
Welcome to PERL.
STRING LENGTH
45
STRING COMPARSION
string1 and string2 is Mismatch!