-
Notifications
You must be signed in to change notification settings - Fork 1
/
getbooks.php
executable file
·50 lines (39 loc) · 1.52 KB
/
getbooks.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
include('config.php');
?>
<table width="700px" align="center" border="0" cellspacing="1" style=" margin-bottom:30px;font-size:12px; margin-top:40px; font-family:Verdana, Geneva, sans-serif;">
<thead>
<tr style="font-size:15px; font-weight:bold; font-family:Verdana, Geneva, sans-serif;" height="30" align="center" >
<td width="100">Acc No</td>
<td width="400">Title</td>
<td width="200">Author</td>
<td width="70">Copies</td>
</tr>
<tr>
<td colspan="4" style="border-bottom:#000 solid 1px;"></td>
</tr>
</thead>
<?php
$year=$_REQUEST['year'];
$query="select * from books where daterecieve='$year' and status='1'";
$query_result=mysql_query($query);
$s=mysql_num_rows($query_result);
if($s==0){ ?>
<div style=" margin-left:224px; color:#F00; font-size:17px; font-weight:bold; font-family:Verdana, Geneva, sans-serif;">No Books Found <?php echo $year; ?></div>
<?php }elseif($query_result){ ?>
<div style=" margin-left:281px; font-size:17px; font-weight:bold; font-family:Verdana, Geneva, sans-serif;">S.Y <?php echo $year; ?></div>
<?php
while($row=mysql_fetch_array($query_result) or die(mysql_error()))
{ ?>
<tr align="center" class="hr" height="25">
<td bgcolor="" width="100">
<?php echo $row['accNo'];?>
</td>
<td width="400"><?php echo $row['booktitle']; ?></td>
<td width="200"><?php echo $row['author1']; ?></td>
<td width="70" ><?php echo $row['bookcopies'];?></td>
</tr>
<?php }
}
?>
</table>