connection error on communicationg ethernet shield with webserver

Hi all!!! I am trying to upload the code given down but this is the message i get all the time!!
IP Address 0.0.0.0
Subnet Mask 0.0.0.0
DNS Server IP 255.255.255.0
Cannot connect to Server
Cannot connect to Server
Cannot connect to Server
Cannot connect to Server
Cannot connect to Server

My code is:

#include <Ethernet.h>           //library for ethernet functions
#include <SPI.h>
#include <Client.h>             //library for client functions
#include <Wire.h>


// Ethernet settings
byte mac[] = {0x09,0xA2,0xDA,0x00,0x01,0x26};  //Replace with your Ethernet shield MAC
byte ip[4] = {192,168,1,3};  //The Arduino device IP address
byte subnet[4] = {255,255,255,0};
byte gateway[4] = {192,168,1,1};
byte DBserver[]  = {192, 168, 1, 2};
IPAddress server(192,168,1,2);                  // IP-adress of server arduino sends data to

EthernetClient client;

bool connected = false; 
void setup() {
    Serial.begin(9600);
      Wire.begin();
        delay (1000); //allow ethernet chip time to wakeup
 Serial.print("*********************************************\n");   
 Serial.print("Initializing Ethernet.");
        Ethernet.begin(mac, ip, gateway); //set static IP 
 Serial.println("*********************************************\n");
  Serial.print("IP Address        : ");
  Serial.println(Ethernet.localIP());
  Serial.print("Subnet Mask       : ");
  Serial.println(Ethernet.subnetMask());
  Serial.print("Default Gateway IP: ");
  Serial.println(Ethernet.gatewayIP());
  Serial.print("DNS Server IP     : ");
  Serial.println(Ethernet.dnsServerIP());  
}

void loop() {
 if (client.connect(server, 80)) {
    Serial.println("-> Connected");
    
    connected = true;
          int ramdom =analogRead(A1);                    
          Serial.print("ramdom");                              
          Serial.println(ramdom);
          Serial.println("******************************************");
          Serial.println("Sending to Server: ");                 
          client.print("GET 192.168.1.2/te/add_data.php?t0=");            
          Serial.print("GET 192.168.1.2/te/add_data.php?t0=");            
          client.print(ramdom);
          Serial.print(ramdom);
          client.println(" HTTP/1.1");                  
          Serial.println(" HTTP/1.1");                  
          client.println("Host: 192.168.1.2/te/");    
          Serial.println("Host: 192.168.1.2/te");    
          client.println("User-Agent: Arduino");        
          Serial.println("User-Agent: Arduino");        
          client.println("Accept: text/html");          
          Serial.println("Accept: text/html");
    
  }
  
   else{
        Serial.println("Cannot connect to Server");               
      }
  
}

Can anybody tell me what am I doing wrong!!

Do you have an SD card in the SD card slot? If so you have to set Pin 4 to OUTPUT HIGH to keep the SD card off the SPI bus so you can talk to the Ethernet chip without interference.