WifiClient not able to post data on Localhost database using NodeMCU. Pls help

Below Code helps NodeMCU to send data to Local database. NodeMCU and the localserver are on the same Network.

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <SPI.h>

float humidityData,temperatureData;
const char* ssid = "SSID_name";
const char* password = "PASSWORD";
char server[] = "192.168.0.XXX";  

WiFiClient client;    

void setup()
{
  Serial.begin(115200);
  Serial.print("Connecting to ");
  Serial.println(ssid);
 
  WiFi.begin(ssid, password);
 
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");
 
//  server.begin();
  Serial.println("Server started");
  Serial.print(WiFi.localIP());
  delay(1000);
  Serial.println("connecting...");
 }
void loop()
{ 
  humidityData = 77;
  temperatureData = 99; 
  Sending_To_phpmyadmindatabase(humidityData, temperatureData); 
  delay(30000); // interval
 }

 void Sending_To_phpmyadmindatabase(float humidityData, float temperatureData)   //CONNECTING WITH MYSQL
 {
   if (client.connect("192.168.0.XXX", 80)) {
    Serial.println("connected");
    // Make a HTTP request:
    Serial.print("GET /testcode/dht11.php?humidity=");
    client.print("GET /testcode/dht11.php?humidity=");     
    Serial.println(humidityData);
    client.print(humidityData);
    client.print("&temperature=");
    Serial.println("&temperature=");
    client.print(temperatureData);
    Serial.println(temperatureData);
    client.print(" HTTP/1.1");
    client.println();
    client.println("Host: 192.168.0.XXX");
    client.println("Connection: close");
    client.println();
  } else {
    // if you didn't get a connection to the server:
    Serial.println("Could not establish a connection with Server");
  }
 }

What does the Serial monitor tell you? You have lots of Serial.print() statements in your code. What does you local webserver logs say?

You could also try something much simpler

    client.print("GET /testcode/dht11.php?humidity=77&temperature=99 HTTP/1.1");
    client.println();