Urgent!!!! Help on posting to mysql using Arduino uno (Wifi shield)

I'm only getting to Post data to one column "Vrms" which is 899, "Irms" column just shows the value '0'

<?php
foreach ($_REQUEST as $key => $value)
{
	if ($key ==="Vrms") {
		$yourdata = $value;
	}
	
	if ($key ==="Irms") {
		$yourdata2 = $value;
	}
}


//
// EDIT: Your mysql database account 

information
//
$username="root";
$password="password";
$database="test";
$tablename = "test12";
$localhost="localhost";


// Check Connection to Database
if (mysql_connect($localhost, $username, 

$password))
  {
  	@mysql_select_db($database) or die 

("Unable to select database");

    // Next two lines will write into your 

table 'test_table_name_here' with 'yourdata' 

value from the arduino and will timestamp that 

data using 'now()'
    $query = "INSERT INTO `test`.`test12` 

(`Vrms`, `Irms`, `timestamp`) VALUES 

('$yourdata', '$yourdata2', 

CURRENT_TIMESTAMP)";
	
  	$result = mysql_query($query);
  } else {
  	echo('Unable to connect to 

database.');
  }

?>
#include <SPI.h>
#include <WiFi.h>

//
// EDIT: change the SSID and password to match 

your network
//
char ssid[] = "Username";  // your network 

SSID (name)
char pass[] = "password";        // your 

network password
int status = WL_IDLE_STATUS;
WiFiClient client;

//
// EDIT: server address to match your domain
//
char server[] = "www.yourdomain.com";

// this is the data that will be passed into 

your POST and matches your mysql column
int yourarduinodata2 = 899;
String y = "Vrms=";
String yourdata;

int yourarduinodata = 999;
String x = "Irms=";
String yourdata2;






void setup() {
  Serial.begin(9600);

  // attempt to connect to wifi network
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to 

SSID: ");
    Serial.println(ssid);
    status = WiFi.begin(ssid, pass);
    // wait 10 seconds for connection
    delay(10000);
  }

  // you're connected now, so print out the 

status
  printWifiStatus();
  
  // Combine yourdatacolumn header (yourdata=) 

with the data recorded from your arduino
  // (yourarduinodata) and package them into 

the String yourdata which is what will be
  // sent in your POST request
  
  yourdata = y + yourarduinodata2;
  yourdata2 = x + yourarduinodata;
  
  
  httpRequest();
}

void loop() {

}

void printWifiStatus() {
  // print the SSID of the network you're 

attached to
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your WiFi shield's IP address
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print the received signal strength
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}

// this method makes a HTTP connection to the 

server
void httpRequest() {
  // if there's a successful connection, send 

the HTTP PUT request
  if (client.connect(server, 80)) {
    Serial.println("connecting...");

    //
    // EDIT: the URL to the location of your 

insert_mysql.php on your web-host
    //
    client.println("POST /test.php HTTP/1.1");

    //
    // EDIT: Host to match your domain
    //
    client.println("Host: yourdomain.com");
    client.println("User-Agent: Arduino/1.0");
    client.println("Connection: close");
    client.println("Content-Type: 

application/x-www-form-urlencoded;");
    client.print("Content-Length: ");
     client.println(yourdata.length());
    client.println();
    client.println(yourdata);
    
    client.println(yourdata2.length());
    client.println();
    client.println(yourdata2);
  
  } 
  else {
    // if you couldn't make a connection:
    Serial.println("Connection failed");
    Serial.println("Disconnecting.");
    client.stop();
  }
}
     client.println(yourdata.length());
    client.println();
    client.println(yourdata);
    
    client.println(yourdata2.length());
    client.println();
    client.println(yourdata2);

Nonsense. When you POST data, the content length is the length of ALL of the data. Once that amount of data has been read, the process of reading data ends. Anything after that is ignored.

Ok never mind I figured it out and got it to work, thanks

What was the issue?

I want to make http POST request to the localhost in arduino using esp8266 wifi shield . Can anyone help through it ? I want to upload gps coordinates to the web server running on localhost and retrieve the geolocations and send it back to the arduino UNO

I want to make http POST request to the localhost in arduino

The name "localhost" means that the client and server are running on the same computer. In the case of the Arduino as client or the Arduino as server, that makes no sense. Whichever you are using, MySQL is most certainly NOT running on the Arduino.

I want to upload gps coordinates to the web server running on localhost and retrieve the geolocations and send it back to the arduino UNO

Not even remotely possible. Loose the phrase "running on localhost" and it IS possible. But you MUST know the server's name or IP address. You can NOT use localhost as its name.

I want to upload gps coordinates to the web server running on localhost and retrieve the geolocations and send it back to the arduino UNO.

Assuming you are trying to connect to your local pc on your lan, you will need to use the local lan IP address of the pc.