-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsearch.php
78 lines (71 loc) · 1.63 KB
/
search.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<pre>
<?php
$first_name="";
$last_name="";
$year_birth="";
$year_missing="";
$gender="";
$height="";
$location="";
$additional_information="";
if(isset($_REQUEST['first_name']))
{
$first_name= trim($_REQUEST['first_name']);
}
if(isset($_REQUEST['last_name']))
{
$last_name= trim($_REQUEST['last_name']);
}
if(isset($_REQUEST['year_birth']))
{
$year_birth= trim($_REQUEST['year_birth']);
}
if(isset($_REQUEST['year_missing']))
{
$year_missing= trim($_REQUEST['year_missing']);
}
if(isset($_REQUEST['gender']))
{
$gender= trim($_REQUEST['gender']);
}
if(isset($_REQUEST['height']))
{
$height= trim($_REQUEST['height']);
}
if(isset($_REQUEST['location']))
{
$location= trim($_REQUEST['location']);
}
if(isset($_REQUEST['additional_information']))
{
$additional_information= trim($_REQUEST['additional_information']);
}
echo $first_name."\n";
echo $last_name."\n";
echo $year_birth."\n";
echo $year_missing."\n";
echo $gender."\n";
echo $height."\n";
echo $location."\n";
echo $additional_information."\n";
$output=array();
$output[0]["first_name"]="Anirudh";
$output[0]["last_name"]="Koul";
$output[0]["year_birth"]="1985";
$output[0]["year_missing"]="1999";
$output[0]["gender"]="m";
$output[0]["height"]="";
$output[0]["location"]="New Delhi, India";
$output[0]["additional_information"]="Brown Eyes";
$output[1]["first_name"]="Happy";
$output[1]["last_name"]="Joe";
$output[1]["year_birth"]="1993";
$output[1]["year_missing"]="2001";
$output[1]["gender"]="f";
$output[1]["height"]="";
$output[1]["location"]="abu dhabi";
$output[1]["additional_information"]="";
$json_output=json_encode($output);
echo $json_output;
?>
</pre>