We correlate the evolution of the mean X-ray flux, emission measure and temperature (Yohkoh SXT & BCS) with the magnetic flux density (SOHO/MDI) in active region NOAA 7978 from its birth throughout its decay, for five solar rotations. We show that these plasma parameters together with other quantities deduced from them, such as the density and the pressure, follow power-law relationships with the mean magnetic flux density (B). We derive the dependence of the mean coronal heating rate on the magnetic flux density. We use the obtained scaling laws of coronal loops in thermal equilibrium to derive observational estimates of the scaling of the coronal heating with B. These results are used to test the validity of coronal heating models. We find that models based on the dissipation of stressed, current-carrying magnetic fields are in better agreement with the observations than models that attribute coronal heating to the dissipation of MHD waves injected at the base of the corona. This confirms, with smaller error bars, previous results obtained for individual coronal loops, as well as for the global coronal emission of the Sun and cool stars.