a web page that users can upload pdf, doc on it with entering title, keywords, category with it.
Also there is a search page that user cansearch them.
A search page and listingthe result.
every row has 1 checkbox .
what i want to do i want to if user will check the checkbox ( if only 1 selected that file will be - if more than 1, they willbe zip or rar(archive) ) they will be downloaded with pressing download button.
There will be select all button ( for result of the search ) also which i coulnt add it here.
<?php
mysql_connect ("localhost", "root","1") or die (mysql_error());
mysql_select_db ("publisher");
$term = $_POST['term'];
?>
<html>
<body>
<p> </p>
<p>Search results for
<?php $term ?>
</p>
<table border=1>
<tr>
<td><p> </p>
</td>
<th>ID</th>
<th>Title</th>
<th>Keyword</th>
<th> Author</th>
<th> Category</th>
<th> FileName</th>
</tr>
<?php
$term = $_POST['term'];
$sql = mysql_query("select * from paper where category like '%$term%' or title like '%$term%' or keyword like '%$term%' or author like '%$term%' ");
//return the array and loop through each row
while ($row = mysql_fetch_array($sql)){
$id = $row['id'];
$title = $row['title'];
$keyword = $row['keyword'];
$author = $row['author'];
$category = $row['category'];
$fname = $row['fname'];
?>
<tr>
<td><input type='checkbox' name='checkboxvar[]' value='<?php echo $value->fname ?>'></td>
<th><?php echo $id;?></th>
<th><?php echo $title;?></th>
<th><?php echo $keyword;?></th>
<th><?php echo $author;?></th>
<th><?php echo $category;?></th>
<th><?php echo $fname;?></th>
</tr>
<?php } ?>
</table>
</html>