-
Notifications
You must be signed in to change notification settings - Fork 1
/
process.php
59 lines (28 loc) · 1.33 KB
/
process.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
51
52
53
54
55
56
57
58
59
<?php
include 'includes/db.php';
$output="";
$data_id = $_POST['data_id'];
$query = "SELECT * FROM other_data WHERE data_id='$data_id'";
$result = mysqli_query($con, $query);
$i=1;
if (mysqli_num_rows($result)>0){
while ($row = mysqli_fetch_assoc($result)) {
//$output[] = $row;
$output .= '<tr>
<input type="hidden" value="'.$row['product'].'" name="product['.$i.']">
<input type="hidden" value="'.$row['qty'].'" name="qty['.$i.']">
<input type="hidden" value="'.$row['desc'].'" name="desc['.$i.']">
<input type="hidden" value="'.$row['rate'].'" name="rate['.$i.']">
<td class="product" data-id1="'.$row['id'].'" >'.$row['product'].'</td>
<td class="qty" data-id2="'.$row['id'].'" contenteditable>'.$row['qty'].'</td>
<td class="desc" data-id3="'.$row['id'].'" contenteditable>'.$row['desc'].'</td>
<td class="rate" data-id4="'.$row['id'].'" contenteditable>'.$row['rate'].'</td>
<td><button type="button" name="btn_delete" id="btn_delete" class="btn btn-outline-danger" data-id5="'.$row['id'].'"><i class="fa fa-trash"></i></button></td></tr>';
$i++;
}
echo $output;
} else {
$output .= '<tr><td>Data Not Found</td></tr>';
echo $output;
}
?>