session videos link
6:54 PM
https://drive.google.com/file/d/0B5dYMHEhXi9tM05jZ0xteUc4X1E/edit?usp=sharing
print user name using session
6:34 PMprint user name using session
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
Session_Start();
$_SESSION['FName']='wasiq';
$_SESSION['LName']='khan';
echo $_SESSION['FName'];
echo $_SESSION['LName'];
?>
<form action="session2.php" method="post">
Name::<input type="text" name="nametext" value="">
FName::<input type="text" name="fnametext" value="">
<input type="submit" name="go" value="enter" />
</form>
</body>
</html>
any other page
<?php
session_start();
echo $_SESSION['FName'];
$name=$_POST['nametext'];
$fname=$_POST['fnametext'];
echo $name.$fname;
?>
prompt calculater with javascript
2:40 PM
<html>
<head>
<title>Calculator</title>
<script type=text/javascript>
function calculator() {
while (operation != 0) {
var operation = prompt("What would you like to do?\n\n0. end the program\n1. do addition\n2. do subtraction\n3. do multiplication\n4. do division\n5. do square root\n", "Type you selection here");
if (operation == 1) {
var num1 = prompt("Enter the first number");
var num2 = prompt("Enter the second number");
alert ("The sum is " + (Number(num1)+Number(num2)));
} else if (operation == 2) {
var num1 = prompt("Enter the first number");
var num2 = prompt("Enter the second number");
alert ("The difference is " + (Number(num1)-Number(num2)));
} else if (operation == 3) {
var num1 = prompt("Enter the first number");
var num2 = prompt("Enter the second number");
alert ("The product is " + (Number(num1)*Number(num2)));
} else if (operation == 4) {
var num1 = prompt("Enter the first number");
var num2 = prompt("Enter the second number");
alert ("The quotiant is " + (Number(num1)/Number(num2)));
} else if (operation == 5) {
var num1 = prompt("Enter the number");
alert ("The square root is " + Math.sqrt(Number(num1)));
}
}
}
</script>
</head>
<body>
<h2><i>Repetition... Looping</i></h2>
<h1><font color=blue>Simple While Loop</font></h1>
<hr>
<center>
<input type=button value="run this program" onclick="calculator()">
</center>
<hr>
<h3>Description</h3>
<h3>Input</h3>
<h3>Output</h3>
<h3>Termination</h3>
</body>
</html>
http://forums.zybez.net/topic/1122395-creating-a-javascript-calculator-that-uses-prompts/
<head>
<title>Calculator</title>
<script type=text/javascript>
function calculator() {
while (operation != 0) {
var operation = prompt("What would you like to do?\n\n0. end the program\n1. do addition\n2. do subtraction\n3. do multiplication\n4. do division\n5. do square root\n", "Type you selection here");
if (operation == 1) {
var num1 = prompt("Enter the first number");
var num2 = prompt("Enter the second number");
alert ("The sum is " + (Number(num1)+Number(num2)));
} else if (operation == 2) {
var num1 = prompt("Enter the first number");
var num2 = prompt("Enter the second number");
alert ("The difference is " + (Number(num1)-Number(num2)));
} else if (operation == 3) {
var num1 = prompt("Enter the first number");
var num2 = prompt("Enter the second number");
alert ("The product is " + (Number(num1)*Number(num2)));
} else if (operation == 4) {
var num1 = prompt("Enter the first number");
var num2 = prompt("Enter the second number");
alert ("The quotiant is " + (Number(num1)/Number(num2)));
} else if (operation == 5) {
var num1 = prompt("Enter the number");
alert ("The square root is " + Math.sqrt(Number(num1)));
}
}
}
</script>
</head>
<body>
<h2><i>Repetition... Looping</i></h2>
<h1><font color=blue>Simple While Loop</font></h1>
<hr>
<center>
<input type=button value="run this program" onclick="calculator()">
</center>
<hr>
<h3>Description</h3>
<h3>Input</h3>
<h3>Output</h3>
<h3>Termination</h3>
</body>
</html>
http://forums.zybez.net/topic/1122395-creating-a-javascript-calculator-that-uses-prompts/

