Cannot connect to server is not possible

I am running a WAMP server on localhost.I am trying to upload data to the server using WIFi.The code connects to the WiFi network but does not connect to the server…I am using version Arduino 1.02 The code is below:

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

    char ssid[] = "Connectify-moloi"; // your network SSID (name)
    char pass[] = "1234567890"; // your network password
    int status = WL_IDLE_STATUS;

    //WiFiServer server(80);
    long previousMillis = 0;
    unsigned long currentMillis = 0;
    long interval = 250000; // READING INTERVAL
    int sensor;
    int analog_val;

    String data;
    String Hall;
    String Temp;
    WiFiClient client;
  //  IPAddress server(192,168,164,1);
    char server[] ="localhost";
    void setup() { 
    Serial.begin(9600);

     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();


              Hall = "50";
              Temp = "50";

        data = "";
    }

    void loop(){

        currentMillis = millis();
        if(currentMillis - previousMillis > interval) { // READ ONLY ONCE PER INTERVAL
            previousMillis = currentMillis;
                     Hall ="50"; //String(analog_val);
                     Temp ="50"; //String(sensor);

        }

        data = "temp1=" + Hall + "&hum1=" + Temp;
           client.flush();
        if (client.connect(server,80)) { // REPLACE WITH YOUR SERVER ADDRESS
            Serial.println("Connected");
            client.println("POST project/add.php HTTP/1.1"); 
            client.println("Host: 192.168.164.1"); // SERVER ADDRESS HERE TOO
            client.println("Content-Type: application/x-www-form-urlencoded"); 
            client.print("Content-Length: "); 
            client.println(data.length()); 
            client.println(); 
            client.print(data); 
        } 

        if (client.connected()) { 
            client.stop();  // DISCONNECT FROM THE SERVER
            client.flush();
        }

        delay(7000); // WAIT FIVE MINUTES BEFORE SENDING AGAIN
    }

    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");
    }

You can't connect to localhost unless you are on the computer running the server software. You must use the IP of the server on the Arduino.