General questions on storing/serving values

Hi Guys. Long time reader first time posterer.

My coding level - novice.

What I want to do, is have an arduino with various sensors off it spit out the information to a webpage. I have seen some threads and videos but I dont quite understand how it works.

Does the sensor value go into a database, and then the webpage requests it? Is it mySQL or something like that?
Or does the webpage read the memory locations directly?
How do I learn how to make a page that will show me everything the arduino can see?

I assume i need a webserver on the arduino, and then put some html code in there? Then connect to it and it fills in the fields?
Why do people use php for this, is it easier?

Sorry for the epic noob questions, really into this stuff, just unsure on the data to website and beyond concept. I have made sketches doing other things, but local wiring and binary type operations seem alot easier than this.

thanks

You can do this using a commercial service such as Pachube, but it sounds like you want to run your own server.

There's many ways to do this, but generally, you have two pages on the web server. One is called by the arduino as en ethernet client with GET or POST and it accepts sensor data. Server side scripts in your language of choice parse the data out of the request and store it somewhere.

The other page has scripts that pull the data from wherever it's stored and present it somehow. The rest is details :wink:

PHP is a popular choice for such things - it's widely used and you can find plenty of example code. My house monitoring web page was built in perl because I had no reason to learn PHP. MySQL is an obvious place to store your sensor data - it's free and popular. There are plenty of other storage options - use a flat file if it suits you, or store it in memory (at least to start with).

For display, I like google charts and dojo widgets.

To get started, I'd try to get the push of the sensor data working; just enough that you can write the readings to a file on the web server.

If you didn't already, have a look at the WebServer example in the IDE as a starting point: file > examples > etehrnet.

It doesn't do any storage, but publishes the analog pins' values to a simple web page.

Then for a bit deeper treatment, you might like to look here

Oops - I missed the fact that you want to run the web server on the Arduino. I was thinking of the scenario where the Arduino passes sensor data to another web server on a machine that can run Apache, PHP, perl mysql etc. All of which means that you should ignore my advice and follow JimboZA's.