In a php file (that works) I generate one value from a database (being the last logged temperature)
<?php
$con = mysql_connect("localhost","datalogger","datalogger");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("datalogger", $con);
$result = mysql_query("SELECT * FROM datalogger.datalogger order by date_time desc limit 1");
while($row = mysql_fetch_array($result)) {
echo $row['temperature']. "\n";
}
mysql_close($con);
?>
But in another php file I have to use this value at a place where there is now a fixed value value: [80]
How do I replace that value 80 with the value generated by the first php file ?