Beruflich Dokumente
Kultur Dokumente
<html>
<head>
<style>
padding:25px;
width:500px;
height:350px;
float:center;}
</style>
<title>
</title>
<body>
<h1 style="color:red">
</p>
<p id="reg">
Email Address<strong>*
size="18" name="email"></br>
<div class="row">
<p>
<label class="radio-inline">
Bad
</label>
<label class="radio-inline">
<input type="radio" name="experience"
Average
</label>
<label class="radio-inline">
Good
</label>
</p>
</div>
</div>
<div class="row">
<label for="comments">
Comments:</label>
maxlength="6000" rows="7"></textarea>
</br>
</div>
</form>
</div>
<script>
if(form.name.value == "") {
form.name.focus();
return;
if(form.email.value == "") {
form.email.focus();
return;
}
if(form.message.value == "") {
form.message.focus();
return;
};
function phonenumber(inputtxt)
if(inputtxt.value.match(phoneno))
return true;
else
return false;
function myFun(){
var x,d,n;
x=document.getElementById("rno").value;
document.getElementById("reg").innerHTML=n;
if((y>=14 || y<=17)&&(d=="MIS"||d=="BCE"||d=="BEC")&&(n>=1000 ||
n<=2000))
document.getElementById("reg").innerHTML="Your Registration
number is Verified.";
else
alert("Invalid regno");
//document.getElementById("reg").innerHTML="invalid";
</script>
</body>
</head>
</html>
Dom:
<html>
<head>
<title>Cricbuzz </title>
</head>
<body>
<header id="myH">
<center>
<h1>Cricbuzz News</h1>
</center>
<hr>
<center>
</center>
</header>
<center>
</center>
<h2>INDIAN Players</h2>
<ol TYPE="square">
<li>Shekhar Dhawan</li>
<li>Virat Kohli</li>
<li>Suresh Raina</li>
<li>Yuvraj Singh</li>
<li>Ravindra Jadeja</li>
<li>Ravichandran Ashwin</li>
<li>B Kumar</li>
<li>Vinay Kumar</li>
<li>Ishant Sharma</li>
</ol>
<h2>AUSTRALIAN Players</h2>
<ol TYPE="square">
<li id="myl">AJ Finch</li>
<li>PJ Hughes</li>
<li>Shane watson</li>
<li>GJ Bailey</li>
<li>GJ Maxwell</li>
<li>AC Voges</li>
<li>BJ Haddin</li>
<li>JP Faulkner</li>
<li>MG Johnson</li>
<li>CJ Mckay</li>
<li>XJ Doherty</li>
</ol>
<h3>Match Summary</h3>
<p id="myP2">Shikhar Dhawan, Rohit Sharma and Virat Kohli made a mockery of a
target of 360, getting India home with nine wickets and 39 deliveries
left<br><b>Virat Kohli:</b> "I kept telling Rohit that it was his day today, but i kept
hitting the ball very well. I didn't bat in the nets yesterday, just had a few throw
downs. I wasn't worried about the short-pitched stuff, i pulled a few of them
early and then they started bowling half-volleys. Rohit is the best of the young lot
that we have and he is the most dangerous T20 player, so it was a privilege to
</p>
<script>
var x=document.getElementById("IMG");
document.getElementById("myH");
document.getElementById("myLi");
document.getElementById("myl");
document.getElementById("myP1").style.color="red";
document.getElementById("myP2")
</script>
</body>
</html>
Matrix Multiplication:
<html>
<?php
function Matrix($m1,$m2){
$r=count($m1);
$c=count($m2[0]);
$p=count($m2);
if(count($m1[0])!=$p){throw new Exception('Incompatible matrixes');}
$m3=array();
for($j=0;$j<$c;$j++){
$m3[$i][$j]=0;
for($k=0;$k<$p;$k++){
$m3[$i][$j]+=$m1[$i][$k]*$m2[$k][$j];
return($m3);
$arr1=array(
array(11,22,33),
array(44,55,66),
array(77,88,99)
);
$arr2=array(
array(0,2,3),
array(1,5,8),
array(3,2,3)
);
$result=Matrix($arr1,$arr2);
echo "The Result of the two matrices<br>";
for($i=0;$i<count($result);$i++)
for($j=0;$j<count($result[$i]);$j++)
echo $result[$i][$j];
echo "<br>";
?>
Php code:
Electric bill:
html code:
<html>
<body>
<button onclick="alert('submitted')">submit</button>
</form>
</body>
</html>
PHP code:
<?php
$a=$_GET['t1'];
$b=($a*1)+20;
$b=($a*1.5)+20;
echo "total charge=$b";
$b=($a*2)+30;
$b=($a*3)+30;
else if($a>500){
$b=($a*4)+40;
if($a>200){
$b=($a*5.75)+40;
}
}
?>
Html:
<html>
<head>
<title>railway reservation form </title>
</head>
<body bgcolor="#0AAFFBC">
<form name="railway">
<center>
<table>
<tr>
<td>From:</td>
</tr>
<tr>
<td>To:</td>
</tr>
<tr>
<td>Name:</td>
<tr>
<td>Age:</td>
<tr>
<td>Address:</td>
<tr>
<td>Payment options:</td>
<td>
</td>
<tr>
</table>
</body>
</html>
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
// Check connection
if ($conn->connect_error) {
// Create database
} else {
$conn->close();
?>
Creating Marks table:
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
web_mark INT(2),
java_mark INT(2),
os_mark INT(2)
)";
if ($conn->query($sql) === TRUE) {
} else {
$conn->close();
?>
Inserting values:
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
} else {
$conn->close();
?>
Retrieval:
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo "id: " . $row["Regno"]. " - Name: " . $row["firstname"]. " " .
$row["lastname"]. " "."web marks: ". $row["web_mark"]. " ". "Java marks:
".$row["java_mark"]." ". "OS marks: ".$row["os_mark"]. "<br>";
} else {
$conn->close();
?>
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
attend varchar(3)
)";
} else {
$conn->close();
?>
Inserting values:
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
} else {
}
$conn->close();
?>
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
$result = $conn->query($sql);
if ($result->num_rows > 0) {
echo "Regno: " . $row["Regno"]. " - Name: " . $row["firstname"]. " "
."Attendence status: ".$row["attend"]. "<br>";
} else {
$conn->close();
?>
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
class_8to9 varchar(10),
class_9to10 varchar(10),
class_10to11 varchar(10),
class_11to12 varchar(10),
class_1to2 varchar(10),
class_2to3 varchar(10),
class_3to4 varchar(10)
)";
if ($conn->query($sql) === TRUE) {
} else {
$conn->close();
?>
Inserting values:
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
}
$sql = "INSERT INTO class1 (Regno,firstname,
lastname,class_8to9,class_9to10,class_10to11,class_11to12,class_1to2,cl
ass_2to3,class_3to4)
VALUES (3434,'John',
'Doe','java','DBMS','Testing','SCAM','OS','Mining','chemistry');";
VALUES (3436,'swag',
'Kennedy','DBMS','chemistry','OS','SCAM','Testing','Java','Data Mining');";
} else {
$conn->close();
?>
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo "Regno: " . $row["Regno"]. " - Name: " . $row["firstname"]. " "
."class 8 to 9: ".$row["class_8to9"]. "class 11 to 12: ".$row["class_11to12"].
"<br>";
}
} else {
$conn->close();
?>
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo "Regno: " . $row["Regno"]. " - Name: " . $row["firstname"]. " "
."class 8 to 9: ".$row["class_8to9"]. " class 1 to 2: ".$row["class_1to2"].
"<br>";
} else {
$conn->close();
?>
Parents getting attendance status:
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo "Regno: " . $row["Regno"]. " - Name: " . $row["firstname"]. " "
."Attendence
} else {
$conn->close();
?>
$username = "root";
$password = "";
$dbname = "myDB";
// Create connection
// Check connection
if ($conn->connect_error) {
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo "id: " . $row["Regno"]. " - Name: " . $row["firstname"] . "<br>". " web
marks: ". $row["web_mark"]. " Java marks: ". $row["java_mark"]. " OS
} else {
$conn->close();
?>