1. Create two php codes that calculate a car’s miles per
gallon and it’s kilometers/liter.
Make a calculator
that calculates a car’s mileage, given the
distance travelled and the amount of gas
consumed. The calculator should look
something like this.
Car Gas Mileage Calculator
Mileage, beginning: "text field"
Mileage, end: "text field"
Gallons of gas: "text field"
Calculate Mileage(submit button)
Use a table with zero-sized borders to make the
text fields line up.
Background color of table should be light blue
When the calculate button is pressed, the user
should be taken to a second page that shows
the results, something like this.
Car Mileage:
If the car has traveled "blank" miles and has consumed "blank"
gallons of gas, then the mileage is "blank" miles per gallon.
Perform Another Calculation (links back to calculator page)
Note that the second page has a link back to
the first page, so the user can do another
calculation if desired. Make Perform another calculation the link
Notes:
For input text field names and your variables don’t use something cryptic like $X, it’s not obvious what
$X means. A variable name like $gallons would be much better.
There are 3.7854118 liters in one gallon.
There are 1.609344 kilometers in one mile.
[login to view URL] php code that calculates a user’s Body Mass Index.
Use a table to make text fields line up. There should be a text field
for entering the user’s weight in pounds, and height in
feet and (separately) inches.
The general format should be
Body Mass Index Calculator
Enter you weight: "text field" pounds
Enter your height: "text field" feet "text field" inches
Calculate BMI (submit button)
When the button is pressed, the BMI should be
calculated, and shown
3. Create php code that displays a table showing
sunrise and sunset times in Boston for the next 10 days. Table should alternate
row colors of blue and yellow.
Create a php script that contains a “for” loop, that displays a table showing
the sunrise and sunset times for the next 10 days. Use the built-in PHP
functions date_sunrise() and date_sunset(). These two functions
accept the following arguments: a timestamp (the date of which you want
the sunrise and sunset), your latitude and longitude, the offset from GMT
(we are -5 hours from GMT).
A timestamp it stored as the number of seconds since the Unix Epoch
(January 1 1970 00:00:00 GMT). You can obtain the current timestamp
with the function time().If you have a timestamp for some time today, and
want a timestamp for sometime tomorrow, add the number of seconds in a
day (24 hours/day * 60 minutes/hour * 60 seconds/minute) to your
timestamp.
Below is an example of how to call date_sunrise(). A call to date_sunset() is similar.
define(LONGITUDE, -71.04);
define(LATITUDE, 42.36);
define(ZENITH, 90);
define(GMT_OFFSET, -5);
$curdate=time();
$sunriseTime = date_sunrise($curdate, SUNFUNCS_RET_STRING,
LATITUDE, LONGITUDE,
ZENITH, GMT_OFFSET);
Code should include:
 "Sunrise and Sunset for Boston, MA" as title.
 Contained in a table
 Have a “for” loop that determines the sunrise and sunset time for Boston MA for the next 10 days,
emitting a table row each trip through the loop
 Alternate table row colors yellow and blue.
HI,
I have read all the details you have mentioned and ready to do this job for you. Please contact me so we can proceed further.
Looking forward to have great working relationship with you.
Hi, I have read all the details you provided about three calculations codes. Thank you for detailed description of your requirements.
Please let me know if you think my services can be valuable to you.
Thanks
I have alot of experience in making php calculations and making complicated php websites. I do alot of freelance work based on php but am new to freelancer.com and will complete your project in 3 days.