Mega, GSM Shield and SD Shield to send data to MySQL using XAMPP

Hopefully I picked the right subject to post this in, as I’m not sure where my error(s) lie.

I’m trying to use the setup described in the title to upload DHT11 sensor data to a table created in a MySQL database using XAMPP.

I unfortunately am not getting any error message at this stage, just no values appearing in my table.

If anyone could spot where I’m going wrong that would be great, as I’m very new to Arduino and have gone in at the deep end I think.

Posted both PHP codes I have tried with many variations.

My MySQL Code:

CREATE TABLE `mydb`.`temphum` (
`id` INT( 255 ) NOT NULL AUTO_INCREMENT ,
`temp` VARCHAR( 255 ) NOT NULL ,
'hum` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = InnoDB ;

My PHP code v1.

<?php
$link = mysqli_connect("localhost", "root", "", "mydb");
$sql = "INSERT INTO mydb.temphum (temp, hum) VALUES ('".$_GET["temp"]."','".$_GET["hum"]."')";
mysqli_query($link, $sql);
?>

My PHP Code v2.

<?php
$link = mysqli_connect("localhost", "root", "", "mydb");
$temp = (isset($_GET['temp']) ? $_GET['temp'] : null);
$hum = (isset($_GET['hum']) ? $_GET['hum'] : null);
$sql = "INSERT INTO mydb.temphum (temp,hum) VALUES (".$temp.", ".$hum.")";
mysqli_query($link, $sql);
?>

My Arduino Code

#include <Wire.h>
#include <HCRTC.h>
#include <SD.h>
#include <dht.h>
#include <SPI.h>
#include <GSM.h>


#define I2CDS1307Add 0x68
#define SD_CS_DIO 53
#define PINNUMBER ""
#define GPRS_APN       "goto.virginmobile.uk."
#define GPRS_LOGIN     "user"
#define GPRS_PASSWORD  ""
#define DHT11_PIN 8

File DataFile;
dht DHT;
HCRTC HCRTC;
GSM gsmAccess;
GSM_SMS sms;
GSMClient client;
GPRS gprs;

IPAddress server(172,0,0,1);
char path[] = "/insert.php";
int port = 80;

void setup(){
  Serial.begin(9600);
  pinMode(SD_CS_DIO, OUTPUT);
  HCRTC.RTCWrite(I2CDS1307Add, 17, 8, 24, 13, 05, 0, 4);
   if (!SD.begin(SD_CS_DIO)) 
  {
    Serial.println("ERROR: SD card failed to initialise");
    while(1);
  }else
  {
    Serial.println("SD Card initialised");
  }
    
  Serial.println("Starting Arduino Web Client.");
  boolean notConnected = true;
  while(notConnected)
  {
    if((gsmAccess.begin(PINNUMBER)==GSM_READY) &
      (gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)==GPRS_READY)){
      notConnected = false;
      } else
    {
      Serial.println("Not connected");
      delay(1000);
    }
  }
  Serial.println("GSM initialized");
  Serial.println("connected GPRS.");
  Serial.println();
}

void loop()
{
  HCRTC.RTCRead(I2CDS1307Add);
  Serial.print(HCRTC.GetDateString());
  Serial.print(", ");
  Serial.print(HCRTC.GetTimeString());
  Serial.println(", ");
  
  int chk = DHT.read11(DHT11_PIN);
  int temp = DHT.temperature;
  int hum = DHT.humidity;
  Serial.print("Temperature = ");
  Serial.println(DHT.temperature);
  Serial.print("Humidity = ");
  Serial.println(DHT.humidity);
  Serial.println();

  DataFile = SD.open("MegaData.csv", FILE_WRITE);
  if (DataFile) 
  {
    DataFile.print(HCRTC.GetDateString());
    DataFile.print(", ");
    DataFile.print(HCRTC.GetTimeString());
    DataFile.print(", "); 
    DataFile.print(DHT.temperature);
    DataFile.print(", ");
    DataFile.print(DHT.humidity);
    DataFile.print(", ");
    DataFile.println();
    DataFile.close();
  }
  else {
    Serial.println("error opening csv file");
  }
  if (client.connect(server, 80)) {
    client.print("GET /insert.php?");
    client.print("temp=");
    client.print(temp);
    client.print("&&");
    client.print("hum=");
    client.print(hum);
    client.println(" HTTP/1.1"); 
    client.println("Host: 127.0.0.1");
    client.println("Connection: close");
    client.println();
    client.println();
    client.stop();
  }
  else{
    Serial.println("client connection falied\n");
  }
  delay(10000);
}

Thanks for any advice or suggestions