A Simple Calorie Calculator using Php
This is a simple calorie calculator using php, this program calculates how many calorie you need each day in order to maintain your weight! This program uses swith case method.
<?php $age=$_POST['age']; $weight=$_POST['weight']; $height = $_POST['height']; $calories="0.0215183"; $gender=$_POST['gender']; switch ($gender){ case 'Female': $gender= 655 + (9.6 * $weight ) + (1.8 * $height) - (4.7 * $age); echo "<p>Your estimated daily metabolic rate is $gender </p>"; echo "<p>This means that you need rouhgly $gender calories a day to maintain your current weight.</p>"; break; case 'Male': $gender=66 + (13.7 *$weight) + (5 * $height) - (6.8 * $age); echo "<p>Your estimated daily metabolic rate is $gender </p>"; echo "<p>This means that you need rouhgly $gender calories a day to maintain your current weight.</p>"; } ?>
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Add new comment