Area Required For Solar Power Plant : Results

[insert_php]
if(isset($_POST[‘capacity’]) && isset($_POST[‘efficiency’])) {

if(!empty($_POST[‘capacity’]) && !empty($_POST[‘efficiency’])) {

$servername = ‘localhost’;
$username = ‘solarman_cal’;
$password = ‘mv)f848R4h~&’;
$dbname = ‘solarman_tools’;
// Create connection

$conn = mysql_connect($servername, $username, $password) or die(“Unable to connect to MySQL”);
mysql_select_db($dbname, $conn );

$c=$_POST[‘capacity’];
$e=$_POST[‘efficiency’];
$ip = $_SERVER[‘REMOTE_ADDR’];
$date= date(‘Y-m-d’);

$sql = “INSERT INTO `area_required` (`capacity`, `efficiency`, `date`, `ip`) VALUES (‘$c’,’$e’,’$date’, ‘$ip’)”;
if (mysql_query($sql) === TRUE) {

} else {
echo “Error: ” .mysql_error() . “
“;
}
mysql_close($conn);

$a=((10*$c*16)/$e);
echo “

Inputs

Solar capacity required “; echo number_format($c);echo” kW
Solar panel efficiency “; echo number_format($e);echo”%

Results

Shade-free roof area required – “; echo number_format($a,2);echo” Sq. m.

Assumptions
  • This calculation assumes that 16% efficiency panels require 10 Sq.m. for every kW, at your location.

Looking to own customized calculators?

Talk to ramya@solarmango.com

“;
}
else {

echo “

To view results, please fill all the fields correctly

“;
}

}[/insert_php]