Warning: Undefined array key "gender" in C:\xampp\htdocs\CTI-110\webtech\coursework\project\workout.php on line 17
Warning: Undefined array key "height" in C:\xampp\htdocs\CTI-110\webtech\coursework\project\workout.php on line 18
Warning: Undefined array key "name" in C:\xampp\htdocs\CTI-110\webtech\coursework\project\workout.php on line 19
Warning: Undefined array key "weight" in C:\xampp\htdocs\CTI-110\webtech\coursework\project\workout.php on line 20
Warning: Undefined array key "age" in C:\xampp\htdocs\CTI-110\webtech\coursework\project\workout.php on line 21 has a basal metabolic rate of 655.
I can't seem to find the issue with the POST function.
$gender = $_POST['gender'];
$height = $_POST['height'];
$name = $_POST['name'];
$weight = $_POST['weight'];
$age = $_POST['age'];
if ($gender == 'male')
{
$bmr = 66 + (6.24 * $weight) +
(12.7 * $height) -
(6.755 * $age);
}
else
{
$bmr = 655 + (4.35 * $weight) + (4.7 * $height) - (4.7 * $age);
}
here is the part of the code I can't figure out, would someone be able to help?