Here I’m going to discuss about, how to add the table row values using php and mysql. This concept is very simple, we can fetch the data from database add/sum the column values. The values are inserted into database and fetch the values from database, and find the sum values by using SUM(column-name).
Code Explanation:
First, create the database and table ‘addtable’. The ‘addtable’ table contain three field, id,maths,english respectively.
The id is autoincrement and maths,english contain values like mark. Second fetch the data from database using mysql query:
S No | Maths | English |
---|---|---|
Total |
FULL CODE
S No | Maths | English |
---|---|---|
Total |
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.