hi there, i m using this coding to retrieve the file from database so that my user can download the file...
[code=php]
<?php
if (!isset($_GET['id'])) die('Invalid Parameter');
include 'connectdb.php' ;
$id = $_GET['id'];
$result= "SELECT content FROM upload WHERE id = '$id'";
$data = mysql_query($re sult) or die(mysql_error ());
$info = mysql_fetch_arr ay($data);
header('Content-disposition: attachment; filename="'.$id .'"');
header('Content-type: application/msword');
//header('Content-type: text/plain');
readfile($info['Content']);
?>
[/code]
result,i keep getting this warning..
i dont understand ,what is the problem...
please help me...i m not familiar with php....
Thank u
[code=php]
<?php
if (!isset($_GET['id'])) die('Invalid Parameter');
include 'connectdb.php' ;
$id = $_GET['id'];
$result= "SELECT content FROM upload WHERE id = '$id'";
$data = mysql_query($re sult) or die(mysql_error ());
$info = mysql_fetch_arr ay($data);
header('Content-disposition: attachment; filename="'.$id .'"');
header('Content-type: application/msword');
//header('Content-type: text/plain');
readfile($info['Content']);
?>
[/code]
result,i keep getting this warning..
Code:
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\ym\downloadprocess.php:13) in C:\Program Files\xampp\htdocs\ym\downloadprocess.php on line 27
please help me...i m not familiar with php....
Thank u
Comment