Search
Language: PHP
1444 reads
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>"; } ?>
Download Code
Your Vote!
Note
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.
- 1444 reads
Relevant Content
- Bookmark icon using prototype
- Johnfamouz HTML Template 1
- Lisland Rainforest Resort and Reservation
- Creating iPhone application in PHP using iPFaces framework
- Passing a value from one web page to another web page
- Random PHP Quiz and Result
- How to Add Yahoo Messenger Client and online Status to your website
- Sample How to Use YouTube API in PHP or HTML
- Download file with counter using Php Header
- Currrency Converter in PHP


Post new comment