-
Notifications
You must be signed in to change notification settings - Fork 0
/
BACKUP.PHP
98 lines (75 loc) · 1.46 KB
/
BACKUP.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
if(isset($_POST['submit']))
{
//echo '<script src="main.js"></script> ';
$name=$_POST['name'];
$age=$_POST['age'];
$weight=$_POST['weight'];
$height=$_POST['height'];
$gender=$_POST['gender'];
$activity=$_POST['activity'];
echo $activity;
$heightm=$height*0.30;
//BMI
$bmi=($weight)/($heightm*$heightm);
echo $bmi;
echo"<br><br>";
//BMR
if(strtolower($gender)=="male")
{
$bmr=66+(13.7*$weight)+(5*$heightm*100)-(6.8*$age);
echo $bmr;
}
else
{
$bmr=655 + (9.6*$weight) + (1.8 *height*100) - (4.7 *$age);
echo $bmr;
}
//Calories Needed
if(strtolower($activity)=='little or no exercise')
{
$cn=$bmr*1.2;
echo $cn;
}
if(strtolower($activity)=='light exercise/sports 1-3 days/week')
{
$cn=$bmr*1.375;
echo $cn;
}
if(strtolower($activity)=='hard exercise/sports 6-7 days a week')
{
$cn=$bmr*1.55;
echo $cn;
}
if(strtolower($activity)=='hard exercise/sports 6-7 days a week')
{
$cn=$bmr*1.725;
echo $cn;
}
if(strtolower($activity)=='very hard exercise/sports & physical job or 2x training')
{
$cn=$bmr*1.9;
echo $cn;
}
if($bmi<18.5)
{
echo("under weight.Your diet plan is ");
}
else if($bmi>=18.5 && $bmi<24.9)
{
echo("normal weight.Your diet plan is ");
}
else if($bmi>=25 && $bmi<29.9)
{
echo("overweight.Your diet plan is ");
}
else if($bmi>=30 && $bmi<39.9)
{
echo("obesity.Your diet plan is ");
}
else if($bmi>40)
{
echo("Morbid obesity.Your diet plan is ");
}
*/
?>