plss help about ethernet shield

Have your Arduino remember the state of the buttons and write the HTML page out next time in such a way that it shows the buttons in their previous state.

PeterH:
Have your Arduino remember the state of the buttons and write the HTML page out next time in such a way that it shows the buttons in their previous state.

uhmm does this apply to the webserver example of ethernet shield? .. can you show me simple codes to remember such states?

uhmm does this apply to the webserver example of ethernet shield? .. can you show me simple codes to remember such states?

const int switchCount = 5; // Use your value here
int switchStates[switchCount];

Then, in the rest of the code, update switchStates[ n ], and use switchStates[ n ] in the calls to digitalWrite().

thank you for the knowledge.. another problem for me, if i use a manual button like a push button to change the states of my arduino pins, and i include this for the update of the states, is there a way that my browser to get such updates? uhmm what i am thinking is that, is there like kind of "automatic refresh" feature so like for every 5 secs it would display the present states of my arduino?(if any manual buttons are used)

pisayjames:
thank you for the knowledge.. another problem for me, if i use a manual button like a push button to change the states of my arduino pins, and i include this for the update of the states, is there a way that my browser to get such updates? uhmm what i am thinking is that, is there like kind of "automatic refresh" feature so like for every 5 secs it would display the present states of my arduino?(if any manual buttons are used)

You asked that earlier in the thread and Paul gave you the answer:

Yes, and no. There is NO way for a server to push information to a client. The client/server relationship is stateless. Once the server sends data to the client, it forgets that the client ever existed.

The server can embed meta tags in the page that it serves that tell the client that it needs to refetch the page every n seconds. It is up to the client software to see those tags, and to act on them.

The server, though, has no idea that a client request is a result of the user loading the page initially or the client refreshing the page.

A web server serves data. There is no way to make a server push data to a client. You wouldn't want google pushing data to you, would you?

A web client pulls data. It can include, in the GET request, information that the server uses to tailor the returned data. That could mean that the server does something like turning a pin on or off, too.

The server can tell the client, using meta tags, that it needs to check back later. That "check back later" part is a completely separate transaction, though.

i just want to ask if there is a "auto refresh" function for the web browser of your ethernet shield? like i want it to autoamatically refresh it every 5 secs..

pisayjames:
i just want to ask if there is a "auto refresh" function for the web browser of your ethernet shield? like i want it to autoamatically refresh it every 5 secs..

Yes. Web browser implies web client.
http://playground.arduino.cc/Code/WebClient

You can do it with the meta refresh tag on whatever is serving up your HTML pages. Here's what you were asking for, from the wikipedia page on the subject:

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