-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathask1.php
46 lines (34 loc) · 1015 Bytes
/
ask1.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
<?php
session_start();
?>
<?php
$con=mysqli_connect('localhost','root','12345');
mysqli_select_db($con,'table');
$uv=$_SESSION['users1'];
echo $uv;
$g="select farmer.id from farmer,supplier where farmer.desird_product=supplier.business and supplier.ID='$uv' ";
//$m="select farmer.desird_product from farmer,supplier where farmer.desird_product=supplier.business and supplier.ID='$uv' ";
$res=mysqli_query($con,$g);
$flag=0;
while($r=mysqli_fetch_assoc($res)){
echo "Farmer is :{$r['id']}";
$flag=$flag+1;
}
if($flag==0){
echo "\nNo Orders yet!!";
}
?>
<html>
<head>
<style>
button{
padding:24px;
}
</style>
</head>
<body bgcolor="lightblue">
<form method="post" action="approve.php">
<button >Approve</button>
</form>
</body>
</html>