|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Calculated field with php
Hi everybody...
I need somethin.. I have a form with some calculated field and I donīt know how to put the calculated data in this field. I want this fields to be displayonly that means that only the data can be put in it by formula not by the user typing.. Ex. I have a grade register form.. and I have 90 in the first grade and 85 in the second I want to calculate the avg. and put this avg in another field. How I do this... Nestor Valdez... Answer me in my email nestorvaldez@hotmail.com |
|
#2
|
|||
|
|||
|
Ill take it from where you have the to grades
firstly you need to do this $var = ($grade1 + $grade2) / 2 then insert $var into the database. |
|
#3
|
|||
|
|||
|
Calculated field with php
Ill take it from where you have the to grades
firstly you need to do this $var = ($grade1 + $grade2) / 2 then insert $var into the database. ==================================== I know that but my problem is : How do i show this avg var in the browser in the field avg, before I save it in the database. i want to show the avg var in this field when i left the GRADE2 field. it is possible? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Calculated field with php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|