-
Notifications
You must be signed in to change notification settings - Fork 1
/
searchajax.php
47 lines (30 loc) · 1.15 KB
/
searchajax.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
<?php
include("dbaseconnection.php");
require_once("auth.php");
$id=$_SESSION['SESS_MEMBER_ID'];
$sql=mysql_query("select labname from lablist where id='$id'");
$row=mysql_fetch_row($sql);
$lname=$row[0];
$tname=$_POST['tname'];
$tname = strtoupper($tname);
$sql=mysql_query("SELECT id,tname,rate from testnames where tname LIKE '%" . $tname . "%' And labname='$lname' ");
echo'<div class="table-wrapper">
<table>
<thead>
<tr style="background:rgba(200, 244, 200, 0.95);">
<th style="text-align:center;">Test Name</th>
<th style="text-align:center;">Rate</th>
<th style="text-align:center;">Click and change</th>
</tr>
</thead>
<tbody>';
while($row = mysql_fetch_row($sql))
{echo'<tr style="border-bottom:3px dashed white;">
<td style="text-align:center;">'.$row[1].'</td>
<td style="text-align:center;">Rs '.$row[2].'</td>
<td style="text-align:center;"><a class="button small" href="changerate.php?id='.$row[0].'">Select</a></td>
</tr >';}
echo' </tbody>
</table>
</div>';
?>