I am new in the field of developement so advance sorry for stupid question.
I am creating a script that upload pdf files and stored in a directory admin/uploads I am storing file path in database my complete code is as under:
$image="uploads/".$_FILES['image']['name'];
$pdf="uploads/".$_FILES['pdf']['name'];
mysql_query("insert into novels values('','$title','$author','$image','$pdf','$body','$Keywords',$cat)");
header("location:add-novel.php?cat=$cat");
?>
and my form is:
<form method="post" action="store-novel.php?cat=<?php echo $_REQUEST['cat'];?>" enctype="multipart/form-data">
<table width="500" border="0" align="left" class="innerTable">
<tr>
<td colspan="2" class="th">ADD NEW NOVEL</td>
</tr>
<tr>
<td>Title</td>
<td><input type="text" name="title" id="title" /></td>
</tr>
<tr>
<td>Author</td>
<td><input type="text" name="author" id="author" />
<!--<input type="hidden" name="category" value="<?php echo $_REQUEST['cat'];?>" />-->
</td>
</tr>
<tr>
<td>Image</td>
<td class="button"><input type="file" name="image" id="image" /></td>
</tr>
<tr>
<td>PDF</td>
<td><input type="file" name="pdf" id="pdf" /></td>
</tr>
<tr><td>post body</td>
<td><textarea name="body" id="body" cols="30" rows="15"></textarea></td>
</tr>
<tr>
<td>Keywords</td>
<td><input type="text" name="Keywords" id="Keywords" /></td>
</tr>
<tr><td></td><td><input type="submit" name="button" id="button" value="Submit" /></td>
</tr>
</table>
</form>
I want to a download page from where user can download my pdf files