Forum Moderators: open
I made an HTML table that looks something like this:
DATE..Jan1.Jan8.Jan15.Jan22... WeekChange TotalChange
--------------------------------------------------------------
VarA...10....16.....28..........................12.........18
--------------------------------------------------------------
VarB...17....30.....45..........................15.........28
--------------------------------------------------------------
The idea is as follows: on a weekly basis, a person goes to the webpage and types in "today's values" for "Variable A" and for "Variable B". The table then computes the change since last week's value, and the change since the date of the first measurement (Jan1).
Simple, not a problem, that part's already done. Now here's my question: what's the best way to handle this data, so the person can easliy retrieve it and add additional data next week? Should the data from the HTML table get saved into an SQL database? Should I have the data from the SQL database generate and populate an updated HTML table like the one above every time the person visits this webpage? Is there already an application or some existing HTML (or PHP) code I could use that already does this type of function?
Any suggestions would really be greatly appreciated. Or if anyone has a short piece of code that already does this, I would love to use it.
Thank you very much, and everyone have a great day.
BrianDW
A few questions come to mind such as ...
How much data do you intend to store?
Will it be the same for every visitor?
Or will each visitor be able to set their own information?
How long will you keep the data?
Will it roll over or be purged?
Storing information in a database or even just a text file on your server is one option. You can store data in a cookie as well, if the user allows you to set a cookie and they don't clear it out at any point (otherwise they lose their data, it would be stored on their machine, not your server). Answering questions like those posted above will help you determine the best option.