energy Calculation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jamhussain
Forum Newbie
Posts: 17
Joined: Sat Apr 07, 2012 2:04 am

energy Calculation

Post by jamhussain »

How can I caluclate the energy used in my Home and how much I saved in the month.
for example, there are 5 bulbs that remain swtich on for 12 hours.
if I use 15 watt bulbs in one month for 12 hours daily.
in next month i use 25 watt bulbs for 12 hours daily.
what will be energy used in my home in each month.
If I use bulbs of 15 watts, how much energy i can save.
please do it in PHP with out using database.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: energy Calculation

Post by requinix »

Do you know the relevant equation(s)? If not then that's where you need to start.

Speaking of, unless you're talking about something more complicated, going from 25W to 15W is a (25-15)/25 = 40% drop in power consumption.
jamhussain
Forum Newbie
Posts: 17
Joined: Sat Apr 07, 2012 2:04 am

Re: energy Calculation

Post by jamhussain »

Dear, How can we submit the values by html and process in php and print the result.thanks.
User avatar
azycraze
Forum Commoner
Posts: 56
Joined: Mon Oct 24, 2011 12:08 pm
Location: India

Re: energy Calculation

Post by azycraze »

form.php

==============
<form action='action.php'>
<input type='text' name='myfield'>
<input type='submit' value='calculate' name='submit_btn'>
<//form>

===================

in action.php

====================
if(isset($_POST['submit_btn']))
{
$value=$_POST['myfield'];
echo $value;
}
====================
Post Reply