no,no purefun,
I didn't mention i didn't try it. I'm attaching my code below. I've been trying and now quite successful. But need some help on writing the contents on to a file.The file name i've mentioned is Selected_streams.txt, i need to write the searched contents to a file.Can u help me on this matter?
<?php
error_reporting(0);
ini_set('display_errors', 1);
?>
<HTML>
<HEAD>
<link href="style.css" type="text/css" rel="stylesheet" />
<TITLE>Streamware</TITLE>
<script language="JavaScript">
var finalquery=""
var conditionflag=false
function goback()
{
location.href="automation.html"
}
</script>
</HEAD>
<BODY background=images/ltgray_lines1.gif text=000000>
<center>
<?php
$streamname[0]=$_REQUEST['streamname1'];
//echo "streamname1 is $streamname1";?> <br> <?
$streamname[1]=$_REQUEST['streamname2'];
//echo "streamname2 is $streamname2";?> <br> <?
$streamname[2]=$_REQUEST['streamname3'];
//echo "streamname3 is $streamname3";?> <br> <?
$streamname[3]=$_REQUEST['streamname4'];
//echo "streamname4 is $streamname4";?> <br> <?
//---------The below code reads from the file and display the selected content--------------------//
$i=0;
$YourFile = "playback_automation_datafile_WMA_44kHz_full_2.txt";
$handle = fopen($YourFile, 'r');
while(!feof($handle))
{
$Data = fgets($handle, 1024);
//if(strpbrk($Data, '$streamname[i]'))
if(strncmp($Data, $streamname[$i], strlen($streamname[$i])) != 0)
{
print $Data;
[b]$File = "Selected_streams.txt";
$Handle1 = fopen($File, 'w');
echo "$Handle1";
fwrite($Handle1, $Data);[/b]
}
print "<p>";
$i++;
}
fclose($handle);
fclose($Handle1);
?>
<br><br>
<form name="createquery" enctype="multipart/form-data" method="post" action="run.php">
<div id="container">
<div id="banner">
<div id="text">
</div>
</div>
<table border=0 cellpadding=4 cellspacing=1>
<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
</td>
<tr>
<td valign=top align=left> </td>
<td valign=top>
<INPUT type="reset" value="Go Back" onclick="javascript:history.go(-1)">
</td>
</tr>
</TABLE>
</FORM>
</BODY>
</HTML>