Temperature Readings to a Local Web Server

I am working on a device that can tell whether a machine is on or not by reading the temperature of it’s power cord and the ambient temperature of the room (It’s Delta-T or change in temp.) It does this with two thermocouples, each of which are attached to different MAX31855 breakout boards (amplifiers) which interpret the readings as temperatures. What I want it to do now is send this data to a mySQL table on a website, and then if the Delta-T is high enough (Below -0.75 degrees Celcius), display that the machine was on and show a time stamp. I will link my codes for my arduino program and the relevant part of the website below in this order. Can anyone show me how to do this or give me some pointers?

 #include <math.h>
#include <Adafruit_MAX31855.h>

int thermoDO = 6;
int thermoCS1 = 3;
int thermoCS2 = 2;
int thermoCLK = 5;

Adafruit_MAX31855 thermocouple1(thermoCLK, thermoCS1, thermoDO);
Adafruit_MAX31855 thermocouple2(thermoCLK, thermoCS2, thermoDO);

#define WLAN_SSID "tek3"
#define WLAN_PASS "Par*rot1"

void setup() {

  Serial.println("MAX31855 test");
  // wait for chip to stabilize

void loop() {
  //print the current temp 
  Serial.print("Internal Temp1 = ");
  Serial.print("Internal Temp2 = ");

  double c = thermocouple1.readCelsius();
  double c2 = thermocouple2.readCelsius();
  if (isnan(c)) {
  Serial.println("You screwed up thermocouple 1");
  else {
    //Serial.print("C1 = "); 
  if (isnan(c2)) {
  Serial.println("You screwed up thermocouple 2");
  else {
   //Serial.print("C2 = "); 
  //Serial.print("F = ");

Now the site’s code:

// Create connection
// Check connection
if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();

$result = mysqli_query($con,"SELECT * FROM ACtime");

echo "<table border='1'>

while($row = mysqli_fetch_array($result)) {
  echo "<tr>";
  echo "<td>" . $row['Date'] . "</td>";
  echo "<td>" . $row['OnTime'] . "</td>";
  echo "</tr>";

echo "</table>";



Any help is appreciated! Thanks.

Any help is appreciated!

With what? You have told us what you want to have happen. You have not told us what actually happens (or doesn't happen).

Why are you using readInternal(), readCelsius(), and read Fahrenheit()? Don't you know what unit of measure you want?

What software on the PC side is reading the serial data and passing information to the PHP script?