Web Technology
Web Technology
Registration form
<!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>Login</title>
<link rel="stylesheet" href="design.css">
</head>
<h1>Registration Form</h1>
<form name="myform">
</select>
<p></p>
<button onclick="working()">Submit</button>
</form>
</body>
<script>
function working() {
let user = document.myform.user.value;
let password = document.myform.password.value;
if (user == "") {
alert("Enter the User Id");
} else if (password == "") {
alert("Enter the password");
} else {
document.write("You have logged in");
}
}
</script>
</html>
<?php
$n=(int)readline("Enter the number: ");
$sum=0;
$temp=$n;
while(floor($n))
{
$rem=$n%10;
$sum=($sum*10) + $rem;
$n=$n/10;
}
if($temp==$sum)
{
echo "The number ",$temp," is palindrome";
}
else
{
echo "The number ",$temp," is not palindrome";
}
?>
3. HTML Table
<!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>Marksheet</title>
<link rel="stylesheet" href="">
<style>
table,
th,
tr,
td {
border: 2px solid black;
text-align: center;
}
</style>
</head>
<body>
<table align="center">
<tr rowspan="4">
<td><img
src="https://upload.wikimedia.org/wikipedia/en/thumb/3/36/Brainware_University.svg/800
px-Brainware_University.svg.png" height="200px" width="200px" id="logo"></td> <br>
<th colspan="3">Programme-Bachelor of Computer Applications <br> Course Name-
Web Technology Lab<br> Course Code-BCAS391 <br> (Semester-3)
</th>
</tr>
<tr>
<th>Programme</th>
<th>SL No.</th>
<th>Student Name</th>
<th>Marks</th>
</tr>
<tr>
<td rowspan="2">
BCA2020
</td>
<td>1</td>
<td>ABCD</td>
<td>75</td>
</tr>
<tr>
<td colspan="2">NA</td>
<td>0</td>
</tr>
<tr>
<td>MCA2020</td>
<td>2</td>
<td>MNOP</td>
<td>89</td>
</tr>
<tr>
<td>BSC(CS)2020</td>
<td>3</td>
<td>DSP</td>
<td>95</td>
</tr>
<tr>
<td colspan="3">Total Marks</td>
<td>259</td>
</tr>
</table>
</body>
</html>
4. How many types of PHP data types are there? Show PHP integer, double and Boolean type
of data with an example with PHP Syntax.
PHP supports total eight primitive data types: Integer, Float, String, Boolean, Array, Object,
resource, and null.
Integers:
$d = 125;
echo $d;
Float:
$d = 1.78;
echo $d;
String:
$d = “Brainware University”;
echo $d;
Boolean:
$c = true;
echo $c;
Array:
$cars = array (“Bugatti”,” McLaren”,” Lamborghini”);
echo “I like” .cars[0] “,” .cars[1] “,” .cars[2]”.”;
Object:
<?php
class func{
function print()
{
echo "BCA Department";
}
}
$obj = new func;
$obj->print();
?>
Resource:
Null:
$a=NULL;
echo $a;
5.Design a registration page of a student in any student portal using HTML script and do
the necessary field
validation(Blank field checking , email id checking, mobile number checking etc) of the
form using java
script.Design the below mentioned HTML Frameset and show the working with the
output.
<html>
<head>
<title>Anish page</title>
<link rel="stylesheet" type="text/css" href="mod form.css"/>
<script type="text/javascript" src="mod form.js"></script></head>
<body>
<div class="container">
<h2><b><i>Registration Form</b></i></h2>
<fieldset>
<label><b>UserId:<input type="text" id="a1" placeholder="abcd"></b></label><br>
<div id="ssd"></div>
<p><label><b>Password:<input type="password" id="a2"
placeholder="password"></b><br></label></p>
<div id="ssw"></div>
<h4>Subject:Math<input type="checkbox">Physics:<input
type="checkbox"></h4>
<h4>Gender:Male<input type="radio">Female:<input type="radio"></h4>
<h4>Cast:General<input type="radio">SC:<input type="radio">
OBC:<input type="radio">OTHERS:<input type="radio"></h4>
<h4>CITY:<select>
<option value="">--Select city--</option>
<option value="kolkata">KOLKATA</option>
<option value="paris">LONDON</option>
<option value="paris">ATHENS</option>
<option value="paris">USA</option></select></h4>
<button onclick="abc()">Submit</button> <button onclick="">Clear</button>
</fieldset>
</div>
</body>
</html>
CSS part
body{
background-color: white;
background-image: url("pp.jpg");
JS part
function abc()
{
let Userid=document.getElementById("a1").value;
let password=document.getElementById("a2").value;
// let email=document.getElementById("a3").value;
if(Userid=="" || Userid==null)
{
document.getElementById("ssd").innerHTML="Userid can't be blanks";
document.getElementById("a1").style.borderColor="#8B0000";
document.getElementById("ssd").style.color="#8B0000";
}
else{
document.getElementById("a1").style.borderColor="#056608";
}
if(password=="" || password.lenght<8)
{
document.getElementById("ssw").innerHTML="password must be greater than 8
character";
document.getElementById("a2").style.borderColor="#8B0000";
document.getElementById("ssw").style.color="#8B0000";
}
else{
document.getElementById("a2").style.borderColor="#056608";
}