<?php
{
session_start();
if(isset($_SESSION['arr']))
{
if($_POST["text"]=='')
{
startsearch($_POST["search"]);
unset($_SESSION['arr']);
$_SESSION['count']=0;
$_SESSION['arr']=array();
}
else
{
array_push($_SESSION['arr'],$_POST["text"]);
$_SESSION['count']=$_SESSION['count']+1;
}
}
else
{
$_SESSION['count']=0;
$_SESSION['arr']=array();
}
}
?>
<?php
function startsearch($srch)
{
//here we have used php ming to create a flash from the values given by the user
$myMovie->save("linear.swf");
}
?>
<html>
<head>
<title>Learn Data Structures the Flash Way</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
</head>
<body onLoad="document.f.text.focus()">
<div id="container">
<div id="content">
<span id="flash"><EMBED src="linear.swf" WIDTH=554 HEIGHT=500 loop="false" TYPE="application/x-shockwave-flash" PLUGINSPAGE= "
http://www.macromedia.com/shockwave/dow ... kwaveFlash" bgcolor="#663333"> </EMBED></span>
<br>
<form name="f" action = "<? echo $_SERVER['PHP_SELF']?>" method="post">
Array value: <input type="text" name="text" value="<?=$text?>" size="30"><br><br>
Search value: <input type="text" name="search" value="<?=$search?>" size="30"><br><br>
<input type="submit" name="sub1">
<br>
*-Press submit after entering every value of the array and finally enter the search value
</form>
</div>
</div>
</body>
</html>