I am trying to pass a value from one script to other script but I keep getting the following error:
<br>
<b>Warning</b>: fopen("","r") - No such file or directory in <b>/home/mshah/public_html/webinterface.php3</b> on line <b>20</b><br>
<br>
<b>Warning</b>: Unable to find file identifier 0 in <b>/home/mshah/public_html/webinterface.php3</b> on line <b>21</b><br>
Here is the script passing the value:
<head>
<title>List of Files</title>
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); }
//-->
</script>
</head>
<body>
<table border="1" cellspacing="1" cellpadding="2">
<tr>
<?php
print "<form method=\"get\" action=\"webinterface.php3\">";
$File = "delete.htm";
print "<td>filename</td>";
print "<td><a href=\"#webinterface\" onClick=\"window.open('webinterface.php3?name=Filename&value=$File',
'results', 'width=640,height=480')\">Edit</a></td>";
print "</form>";
?>
<td><a href="delete.htm" target="_blank">Delete</a></td>
<td><a href="move.htm" target="_blank">Move</a></td>
<td><a href="copy.htm" target="_blank">Copy</a></td>
</tr>
</table>
<!-- </form> -->
</body>
Here is the script accepting the variable:
c_html$ vi webinterface.php3
<head>
<title>Web Interface</title>
</head>
<body>
<form method="post" action="webinterface.php3">
<div align="left">
<input type="submit" name="Submit" value="Save" />
<input type="submit" name="Submit" value="Save and Close" />
<input type="submit" name="Submit" value="Close" onClick="window.close()" />
</div>
<textarea name="Interface" cols="60" rows="24">
<?php
print "filename = $Filename<br />\n";
$FileHandle = fopen($Filename, "r");
fpassthru($FileHandle);
?>
</textarea>
<div align="left">
<input type="submit" name="Submit" value="Save" />
<input type="submit" name="Submit" value="Save and Close" />
<input type="submit" name="Submit" value="Close" onClick="window.close()" />
</div>
</form>
</body>
What I am doing wrong? Please someone help...
Thank You!