-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathff.php
More file actions
64 lines (35 loc) · 1.54 KB
/
Copy pathff.php
File metadata and controls
64 lines (35 loc) · 1.54 KB
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
63
64
<?php
ini_set('error_reporting',E_ALL & ~E_DEPRECATED & ~E_NOTICE);
include('connect.inc');
//$edesignation = $_POST['edesignation'];
echo('<form action="ff.php" method="POST">');
$sql_faculty = "SELECT distinct categoryy FROM fooditems";
$result = mysql_query($sql_faculty);
if(!$result) { die('<p> Error Perofrmingiii query .... </p>'); }
if(mysql_num_rows($result)==0) { die('<p>Info does not exist</p>'); }
echo('<select name="select_categoryy" onchange="this.form.submit()">');
echo("<option SELECTED VALUE = \"Select categoryy\">Selecttt Category </option> ");
while($row = mysql_fetch_object($result))
{
echo("<option value=\"$row->categoryy\">$row->categoryy</option>");
}
echo('</select>');
echo('</form>');
//Second Query started
$select_faculty=$_POST['select_categoryy'];
echo('<form action="food_display.php" method="POST">');
$sql_department = "SELECT distinct Foodname FROM fooditems where categoryy = '$select_faculty'";
$result1 = mysql_query($sql_department);
if(!$result1) { die('<p> Error Perofrminghhh query .... </p>'); }
if(mysql_num_rows($result1)==0) { die('<p>Info does not exist</p>'); }
echo('<select name="Foodname">');
echo("<option SELECTED> Select your choice </option>");
while($row=mysql_fetch_object($result1))
{
echo("<option value=\"$row->Foodname\">$row->Foodname</option>");
}
echo('</select>');
echo('<input type="hidden" value=0 name="init" />');
echo('<input type="submit" value="Go..." />');
echo('</form>');
?>