Help with auto refresh

i use the old model ENC2J80 module ethernet shield, now i want to add an auto refresh everytime i use my push buttons… i dont know the code… plss help… heres my sketch so far… i want to have auto refresh everytime i perform pushbuttons…

#include "etherShield.h"
#include "ETHER_28J60.h"

int outputPin = 7; 
int anotherOutputPin = 6; 
int button = 8;
int button1 = 5;
boolean x = 0;
boolean y = 0;


static uint8_t mac[6] = {
  0x54, 0x55, 0x58, 0x10, 0x00, 0x24};    

static uint8_t ip[4] = {
  192, 168, 1, 15}; 

static uint16_t port = 80; 

ETHER_28J60 e;

void setup()
{ 
  e.setup(mac, ip, port);
  pinMode(outputPin, OUTPUT);
  pinMode(anotherOutputPin, OUTPUT);
  pinMode(button, INPUT);
  pinMode(button1, INPUT);
}
//led1=off&led2=off
void loop()
{
   if(x == false){
  if(digitalRead(button) == HIGH){
    x = true;
     if (digitalRead(outputPin) == HIGH){
       digitalWrite(outputPin, LOW);
   Serial.print("b");
     }
     else {
       digitalWrite(outputPin,HIGH);
   Serial.print("a");
     }
  }
  }
  if(digitalRead(button)== LOW){
    x = false;
  }
     if(y == false){
  if(digitalRead(button1) == HIGH){
    y = true;
     if (digitalRead(anotherOutputPin) == HIGH){
       digitalWrite(anotherOutputPin, LOW);
   Serial.print("b");
     }
     else {
       digitalWrite(anotherOutputPin,HIGH);
      
   Serial.print("a");
     }
  }
  }
  if(digitalRead(button1)== LOW){
    y = false;
  }

  
  char* params;
  if (params = e.serviceRequest())
  {
    //e.print("<h1><a>Arduino Web Remote</a></h1>");
    if (strcmp(params, "?1") == 0)
    {
      digitalWrite(outputPin, HIGH);
      if(digitalRead(anotherOutputPin) == HIGH){
      e.print("<a><button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED1 IS OFF</button></a><a>
<button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED2 IS OFF</button></a>");
      }
     else{
       e.print("<a><button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED1 IS OFF</button></a><a>
<button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED2 IS ON</button></a>");
    
     } 
  }
     if (strcmp(params, "?2") == 0)
    {
      digitalWrite(outputPin, LOW);
      
       if(digitalRead(anotherOutputPin) == HIGH){
      e.print("<a><button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED1 IS ON</button></a><a>
<button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED2 IS OFF</button></a>");
      }
     else{
       e.print("<a><button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED1 IS ON</button></a><a>
<button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED2 IS ON</button></a>");
    
     }
      
     // e.print("<a href='?4'><button style='border: 1px solid #000; border-left: 10px solid #000' type='button'>LED1 IS ON</button></a><a href='?1'>
<button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED2 IS OFF</button></a>");
    }
     if (strcmp(params, "?3") == 0)
    {
      //digitalWrite(outputPin, LOW);
      digitalWrite(anotherOutputPin, LOW);
       if(digitalRead(outputPin) == HIGH){
      e.print("<a><button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED1 IS OFF</button></a><a>
<button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED2 IS ON</button></a>");
      }
     else{
       e.print("<a><button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED1 IS ON</button></a><a>
<button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED2 IS ON</button></a>");
    
     }
     // e.print("<a href='?2'><button style='border: 1px solid #000; border-left: 10px solid #000' type='button'>LED1 IS ON</button></a><a href='?3'>
<button style='border: 1px solid #000; border-left: 10px solid #000' type='button'>LED2 IS ON</button></a>");
    }
     if (strcmp(params, "?4") == 0)
    {
      //digitalWrite(outputPin, HIGH);
      digitalWrite(anotherOutputPin, HIGH);
       if(digitalRead(outputPin) == HIGH){
      e.print("<a><button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED1 IS OFF</button></a><a>
<button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED2 IS OFF</button></a>");
      }
     else{
       e.print("<a><button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED1 IS ON</button></a><a>
<button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED2 IS OFF</button></a>");
    
     }
     // e.print("<a href='?3'><button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED1 IS OFF</button></a><a href='?2'>
<button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED2 IS OFF</button></a>");
    }
    if (strcmp(params, "?5") == 0)
    {
      digitalWrite(outputPin, HIGH);
      digitalWrite(anotherOutputPin, HIGH);
      
      e.print("<a><button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED1 IS OFF</button></a><a>
<button style='border: 1px solid #ff0000; border-left: 10px solid #ff0000' type='button'>LED2 IS OFF</button></a>");
    }
    if (strcmp(params, "?6") == 0)
    {
      digitalWrite(outputPin, LOW);
      digitalWrite(anotherOutputPin, LOW);
      e.print("<a><button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED1 IS ON</button></a><a>
<button style='border: 1px solid #606c00; border-left: 10px solid #606c00' type='button'>LED2 IS ON</button></a>");
    }
    e.respond();
  }
}

pisayjames: now i want to add an auto refresh everytime i use my push buttons..

Auto refresh what?

now i want to add an auto refresh everytime i use my push buttons.

You can't. A client asked for information. You provided it. The client hung up. As the server, you can NOT push data to clients.

You can add meta tags to the page, to tell the client to call back again after a while. The server has no way of knowing, though, whether the client has ever called before.

Use Tools + Auto Format before you post code again. That crap is horrid.

You could write a javascript to cause the client browser to request info from the arduino. Or even better, have the arduino send data to a web server when ever it wants, and have a php system to collect that data while also providing a system to send data to clients.

php websites are fun, just a little bit of work to get going is all. There are many free servers out there, and plenty of info, also javascript isn't really required, php uses sessions which can keep persistent data between pages.

You can add meta tags to the page, to tell the client to call back again after a while. The server has no way of knowing, though, whether the client has ever called before.

whats the code for to have meta tags? i am sorry for the crap sketch

whats the code for to have meta tags?

client.print("The appropriate crap goes here");

I'm willing to bet google will tell you what the appropriate crap is. It is NOT an Arduino issue. There are some things you just need to learn for yourself.

Honestly I’m not sure what you’re looking to do but this is a meta tag refresh.

<meta http-equiv="refresh" content="10">

Quick5pnt0:
Honestly I’m not sure what you’re looking to do but this is a meta tag refresh.

<meta http-equiv="refresh" content="10">

can you explain in simple terms what does meta tag refresh do? thank you

http://lmgtfy.com/?q=Meta+refresh