Problem ze skryptem

Mam problem ze skryptem walki, otóż gdy klikne na przycisk (radio) ataku to od zmiennej $ehp odejmuje mi $mydamage ale gdy poraz kolejny klikne na ten przycisk to już nieodejmuje :/. Jak zrobić aby cały czas po nacisnięciu przycisku odejmowało mi tą zmienną?prubowałem już wielu sposobów i nic, to mój skrypt:

<?php

require_once("funkcje.php");

?>

<?php

if (!isset($_GET['fight'])) {

print"

Opis
  • Walcz z potworami
    "; } if ($_GET[‘action’] == ‘monster’ && !isset($_GET[‘fight’])) { print "

| Nazwa | Opcje |
| $elist2[name] | Walka |

“; } } $round = 1; if (isset($_GET[‘fight’])) { $enemy = mysql_fetch_array(mysql_query(“select * from monsters where id=$_GET[fight]”)); $wep = mysql_fetch_array(mysql_query(“select * from players where owner=$stat[id] and status=‘E’ and type=‘W’”)); $mydamage1 = $wep[power] + $stat[strenght]; $mydamage2 = $mydamage1 + $stat[bj]; $mydamage = $mydamage2 - ($enemy[defense] + $enemy[agility]); $edamage1 = rand($enemy[damage1], $enemy[damage2]); $edamage = $edamage1 + $enemy[strenght]; $ehp = $enemy[‘hp’]; if ($mydamage < 1) { $mydamage = 1; } print "
TURA: $round”; print "

| **$stat[user]HP :[$stat[hp]/$stat[max_hp]] MP :[$stat[mp]/$stat[max_mp]]$enemy[name]**HP: [$enemy[hp]] | Atak Wypij miksture Ucieczka |

"; if ($_POST[‘action’] == ‘attack’) { print "$stat[user] atakuje $enemy[name] zadając $mydamage obrażeń "; while ($ehp = ($ehp - $mydamage)) { print "$stat[user] atakuje $enemy[name] ($ehp zostało) "; $round = ($round + 1); break; } print "$enemy[name] atakuje $stat[user] zadajać $edamage obrażeń "; mysql_query(“update players set hp=hp-$edamag where id=$stat[id]”); print “$ehp”; } } ?> [/code]