I'm a total noob at PHP but I'm trying, with the information I can find, to build a script that reads multiple rows from a MySQL table. Each row only contains a number. Let me give an example:
Every ID in the table has a row called "number".
ID| NUMBER
1 | 8
2 | 12
3 | 6
4 | 9
Now I need a script that - for example - takes ID 1, 2, and 4 and calculates the total amount 8 + 12 + 9 = 29
. 3 is not interesting and I don't want that row in the calculation process. Next this total number needs to be output to a blank website page, so it only shows the total number without anything else.
Examples would be more than welcome and greatly appreciated!