I have a number of data points that I want to display on a web page. At the moment I use Imagemagick and place the data items on a base image and just display the image. the data gets updated every 5 minutes. Data is for instance temperatures and pressures.

I was thinking if I could just write the data values into a very simple CSS sheet and get a form control (text box) on my web page, to show the value from the CSS. I ahve about 20 floating point numbers to show.

As I am new to CSS and forms, I was hoping someone could just show me how I declare a variable in the CSS and then show this variable in my web page text box.

Recommended Answers

All 5 Replies

I was thinking if I could just write the data values into a very simple CSS sheet and get a form control (text box) on my web page, to show the value from the CSS.

No you can't. CSS deals with the looks of the web page, not the content of the web page.

i think jakesee is right, you need to use PHP, ASP or something else to do it.

i think jakesee is right, you need to use PHP, ASP or something else to do it.

Yupp PHP can do it ;)

PHP can't do it alone. You will need to be sending data to it from somewhere for it to calculate and run on the server prior to the page loading.

CSS would be used to format the data as the page renders.

Another method you could do, if you had time and resources, would be to store the data into a database and use it. I am not sure what application you are wanting this for, but it sounded like it was coming from some database somewhere when you say "datapoints."

PHP can do all the nitty gritty...

Throw in some Javascript to make it look nice with a bit of CSS...

Thats good home made data viewing

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.