-
Notifications
You must be signed in to change notification settings - Fork 1
/
getdataajax.php
40 lines (23 loc) · 998 Bytes
/
getdataajax.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
<?php
include("dbaseconnection.php");
$user=$_POST['id'];
$sql=mysql_query("select tname,rate,name,phone,address,counter,id from dashboard where username='$user' order by id DESC");
while($row=mysql_fetch_row($sql))
{
if($row[5]>=0){$rgb="#F4A460";}
else{$rgb="#FFE4B5";}
echo'
<tr style="background:'.$rgb.';">
<td >Name : <span style="color:green;">'.$row[2].'<span></td>
<td >Phone no. : <span style="color:green;">'.$row[3].'<span></td>
</tr>
<tr style="background:'.$rgb.';">
<td >Test : <span style="color:black;">'.$row[0].'<span></td>
<td >Rate : <span style="color:green;">Rs '.$row[1].'<span></td>
</tr>
<tr style="background:'.$rgb.';">
<td colspan="2">Address : <span style="color:black;">'.$row[4].'<span></td>
</tr>';
$sql6=mysql_query("update dashboard set counter=counter+1 where id='$row[6]'");
}
?>