Quick PHP code Question?

Adam Tron

New member
I try not to ask questions and usually find the answer on my own. but I have a Quick question

CODE***

<?php

$enemy = "150";

if ( $enemy < "0" ) {
echo "you have killed the monster<br />";
}
echo "monsters HP" . "$enemy <br />";

$char = "100";

if ($char < "0"){
echo "you have died game over!<br />";
}
echo "your HP" . "$char<br />";

$attack = $enemy - "10";
$focus = $char - "5";


?>
<button type="button" id="$attack">attack</button>

<button type="button" id="$focus">focus</button>

/CODE****


My problem is Is php the best for this? If not I can learn JavaScript as well?. how can i make this work and be refreshed to the user?
I am sorry, I really feel bad asking this.

Thank you in advance!
 
Back
Top