-
Notifications
You must be signed in to change notification settings - Fork 6
/
bill.php
38 lines (33 loc) · 888 Bytes
/
bill.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
<?php
require_once "connection.php";
if(isset($_POST['billinfo']))
{$fid=$_POST['fid'];
$frmdate=$_POST['from-date'];
$todate=$_POST['to-date'];
$sql="SELECT id,fname,milk_type from farmer where id='$fid'";
$query_run=mysqli_query($conn,$sql);
if($query_run)
{
foreach($query_run as $row)
{
echo "farmer id:".$row['id']."<br>";
echo "famer name:".$row['fname']."<br>";
echo "milk_type:".$row['milk_type']."<br>";
}
}
else{
echo "record not found";
}
}?>
value="<?php if($row['milk_type']=="cow||Cow||COW")
{
$sl="select product_cost from Dairy_products where produt_id=210";
$result=mysqli_fetch_assoc($sl)
echo $result['product_cost'];
}
else{
$sl="select product_cost from Dairy_products where produt_id=209";
$result=mysqli_fetch_assoc($sl)
echo $result['product_cost'];
}
?>"