> from a server to local machine when the form is being submitted.I
> have no idea about it.The code can be in any web Technologies
> (JSP,Servlet,Cold Fusion).If u have any idea send me in reply.
<?php
if (isset($_POST['filename']) )
{
$downloadfile=$_POST['filename'];
include($downloadfile);
}
else {
include('reject.php');
}
?>
that is one way, however include will display the file, probably not what you
want. this is probbaly better:
<?php
header("Content-Disposition: attachment; filename=" . $downloadfile);
$datafile = fopen("$downloadfile","r");
$data = fread($datafile, 1000000);
echo $data;
?>
You will of course have to add a loop os that $data become $data = $data + more
read data.