Forum Moderators: open
echo "Lighting watts: ".$row['light']; echo "<br />";
echo "Kitchen watts: ".$row['kitchen']; echo "<br />";
echo "House watts: ".$row['house']; echo "<br />";
echo "Misc watts: ".$row['misc']; echo "<br />";
echo "Total Watt Usage: ".$row['gensize']; echo "<br />";
?php
require ("gChart.php");
$piChart = new gPieChart();
$piChart->set3D(true);
$piChart->addDataSet(array(112,315,66,40));
$piChart->setLegend(array("Lighting", "Kitchen", "House","Misc"));
$piChart->setLabels(array("Lighting", "Kitchen", "House","Misc"));
$piChart->setColors(array("ff3344", "11ff11", "22aacc", "3333aa"));
?>
<img src="<?php print $piChart->getUrl(); ?>" />
<?php
mysql_connect("localhost", "username", "pass") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());
$result = mysql_query("SELECT * FROM offgrid_calculator WHERE id= (SELECT max(id) FROM offgrid_calculator)")
or die(mysql_error());
$row = mysql_fetch_array( $result );
echo "Name: ".$row['Name']; echo "<br />";
echo "Phone Number: ".$row['Phone']; echo "<br />";
echo "Email: ".$row['Email']; echo "<br />";
echo "Your Comments: ".$row['Feedback']; echo "<br />";
echo "Your Unique ID: ".$row['id']; echo "<br />";
echo "Lighting watts: ".$row['light']; echo "<br />";
echo "Kitchen watts: ".$row['kitchen']; echo "<br />";
echo "House watts: ".$row['house']; echo "<br />";
echo "Misc watts: ".$row['misc']; echo "<br />";
echo "Total Watt Usage: ".$row['gensize']; echo "<br />";
$email = "sender@sender.com"; //senders e-mail adress
$recipient = $row['Email']; //recipient
$subject = "Off Grid Calculator Results Coming Soon!"; //subject
mail($recipient, $subject, $mailtxt); //mail command :)?>
<?php
require ("gChart.php");
$piChart = new gPieChart();
$piChart->set3D(true);
$piChart->addDataSet(array(112,315,66,40));
$piChart->setLegend(array("Lighting", "Kitchen", "House","Misc"));
$piChart->setLabels(array("Lighting", "Kitchen", "House","Misc"));
$piChart->setColors(array("ff3344", "11ff11", "22aacc", "3333aa"));
?>
<img src="<?php print $piChart->getUrl(); ?>" />
email it
echo "Name: ".$row['Name']; echo "<br />";
echo "Phone Number: ".$row['Phone']; echo "<br />";
echo "Email: ".$row['Email']; echo "<br />";
echo "Your Comments: ".$row['Feedback']; echo "<br />";
echo "Your Unique ID: ".$row['id']; echo "<br />";
echo "Lighting watts: ".$row['light']; echo "<br />";
echo "Kitchen watts: ".$row['kitchen']; echo "<br />";
echo "House watts: ".$row['house']; echo "<br />";
echo "Misc watts: ".$row['misc']; echo "<br />";
echo "Total Watt Usage: ".$row['gensize']; echo "<br />";
$email = "sender@sender.com"; //senders e-mail adress
$recipient = $row['Email']; //recipient
$subject = "Off Grid Calculator Results Coming Soon!"; //subject
$emailtxt = '';
$emailtxt .= "Name: ".$row['Name']; $emailtxt .= "<br />";
$emailtxt .= "Phone Number: ".$row['Phone']; $emailtxt .= "<br />";
$emailtxt .= "Email: ".$row['Email']; $emailtxt .= "<br />";
$emailtxt .= "Your Comments: ".$row['Feedback']; $emailtxt .= "<br />";
$emailtxt .= "Your Unique ID: ".$row['id']; $emailtxt .= "<br />";
$emailtxt .= "Lighting watts: ".$row['light']; $emailtxt .= "<br />";
$emailtxt .= "Kitchen watts: ".$row['kitchen']; $emailtxt .= "<br />";
$emailtxt .= "House watts: ".$row['house']; $emailtxt .= "<br />";
$emailtxt .= "Misc watts: ".$row['misc']; $emailtxt .= "<br />";
$emailtxt .= "Total Watt Usage: ".$row['gensize']; $emailtxt .= "<br />";
echo $emailtxt; // Echoing it to output as you did before
$emailtxt = str_replace('<br />',"\n",$emailtxt); // Replacing HTML link breaks with newlines, for text e-mails
$email = "sender@sender.com"; //senders e-mail adress
$recipient = $row['Email']; //recipient
$subject = "Off Grid Calculator Results Coming Soon!"; //subject
[ultimafantasy.com...]
submit it if you like so you see everything in action. again, thank you very much.