-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpro_list.php
62 lines (57 loc) · 2.07 KB
/
pro_list.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
60
61
62
<?php
require 'config.php';
$conn = connection();
$sql = "SELECT * FROM product p inner join category c on c.cat_id=p.pro_grpid inner join type t on t.ty_id=p.pro_typeid inner join firm f on f.firm_id=p.pro_firmid
ORDER BY cat_name ASC ";
$data = $conn->query($sql);
$cat_dat = "SELECT * FROM category order by cat_name ASC";
$cat_dat = $conn->query($cat_dat);
$cat_dat1 = "SELECT * FROM category order by cat_name ASC";
$cat_dat1 = $conn->query($cat_dat1);
$firm_data = "SELECT * FROM firm order by firm_name ASC";
$firm_data = $conn->query($firm_data);
$firm_data1 = "SELECT * FROM firm order by firm_name ASC";
$firm_data1 = $conn->query($firm_data1);
$conn=null;
?>
<!-- <div class="col-md-12"> -->
<div class="panel panel-full-color panel-full-danger">
<div class="panel-heading " style="background-color: #d30000;">
<strong>PRICE LIST</strong>
<div class="tools">
<label class="control-label panel-heading" style="color:white;"> </label>
<select class="form-control " id="spro_firm" onchange="get_price_list(this.value);" style="margin-top:-32%; background-color: antiquewhite;height:50%; width: 247px;">
<option value="">Select firm</option>
<?php foreach ($firm_data1 as $fd1){ ?>
<option value="<?php echo $fd1['firm_id']; ?>"><?php echo ucwords($fd1['firm_name']);; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<span id="datare">
</span>
<!-- </div> -->
<!-- <div class="col-sm-12">
<div class="panel panel-default panel-table">
<div class="panel-body"> -->
<!-- <span id="datare">
</span> -->
<!-- </div>
</div>
</div> -->
</div>
<script>
function get_price_list(id)
{
$.ajax({
type: "POST",
url: 'get_price_list.php',
data: {id:id},
success:function(msg) {
// alert(msg);
$('#datare').html(msg);
}
});
}
</script>