Friday, 3 January 2014

Filing

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>lab11</title>
</head>

<body>
<form action="file.php" method="post">
<label>Filename:</label>
<input name="filename"/><br/>
<label>Contents:</label>
<input name="content"/><br/>
<input type="submit" name="submit" />
</form>
<?php
if(isset($_POST["submit"]))
{
$fname=$_POST["filename"];
$content=$_POST["content"];
$fh=fopen($fname,'w');
fwrite($fh,$content);
}
?>
</body>

</html>



<?php$file = 'C:/Check.txt';$fh = fopen($file,'w') or die('Could not open the file');fwrite($fh, 'This is some Addition' ) or die('Could not Write to File');fclose($fh);?>



<?php
$file = 'C:/Check.txt';
$data = file($file) or die('Could not read file');
echo $data[2];
foreach($data as $line)
{
 echo $line;
 //echo $data[1];
 }
 ?>




<?php
$file = 'C:/Check.txt';
$fh = fopen($file,'r') or die ('Could not open file');
$data =  fread($fh, filesize($file)) or die ('could not read file');
fclose($fh);
echo $data;

?>




color bg

<html>
<head>
<script type="text/javascript">
function disp_prompt()
{
var name=prompt("Please enter your name","red");
if (name=="red")
  {
  document.bgColor = "red";
  }
  else
  return 0;
}
</script>
</head>
<body>

<input type="button" onclick="disp_prompt()" value="Display a prompt box" />

</body>
</html>



<!DOCTYPE html>
<html>
<head>
<script src="a.js">
</script>
<script>
$(document).ready(function(){
  $("p").click(function(){
    $(this).hide();
  });
});
</script>
</head>
<body>
<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>
</body>
</html>




<html>
<head>
<script type="text/javascript">
function disp_prompt()
{
if (name="red" )
  {
  document.bgColor = "red";
  }
}
function disp_prompt1()
{
if (name="blue" )
  {
  document.bgColor = "blue";
  }
}
function disp_prompt2()
{
if (name="green" )
  {
  document.bgColor = "green";
  }
}
</script>
</head>
<body>

<input name="red" type="button" onclick="disp_prompt()" value="red" />
<input name="blue" type="button" onclick="disp_prompt1()" value="blue" />
<input name="green" type="button" onclick="disp_prompt2()" value="green" />

</body>
</html>

Web

Accordian Click

Form

Cool Java Validation HTML Validation

registration

respect-business-responsive

Student-Registration-Form

https://www.dropbox.com/sm/create/Web/Violet-Registration-Form.rar

https://www.dropbox.com/sm/create/Web/xHTML.rar

https://www.dropbox.com/s/2aos586rusvz4ep/web.rar

https://www.dropbox.com/s/iz99mzzfk2td6jv/vvxv.rar

Lectures