Well health bars as you know are typically designed to be updated as the action happens in real time. Or in the case of turn based battle updated whenever damage is dealt or healing is to begin. It depends primarily on the way you have setup the boss scenario. If you are using standard page refreshes to "attack" and hit a submit button, you would then update the boss health bar according to its success, have your boss deal damage to your character and depending on its success, update your health stats, then render the page back to the user to show both attack results.
In a PHP game like this you just need to have the health bar visually show the user where they stand in health. Typically it will be the amount of life left of the available life given.
Your character has 100 health points and your boss has 300. Your bar would be drawn to represent 100% or a full bar. Same with the boss. You press attack, the page goes to the server where it is calculated that you did 50 fire damage and 20 lightning damage. In turn the boss did a crushing blow and knocked out 30 health on you. So now your health is 70 and the boss is 250. Battle damage is assigned to stats in a database or whatever, then PHP will read the database and draw a bar that is 70% filled. This means if the bar was 100px wide, the bar should now be 70px wide. Your boss should have about 83% of their bar filled or 83px wide. The page is then shown back to the user with the 70px and 83px wide health bars.
Understand?

Edit: This could also be implemented with AJAX to give you more real life health bar action. It is up to you how that works. Just thought I would throw that in to let you know.
This post has been edited by Martyr2: 30 Apr, 2008 - 09:19 AM