A real problem $strXP not going any higher than 16 o_O
Posted: Thu Dec 07, 2006 9:48 pm
Can someone tell me why my variable $strXP isnt going any higher then 16?, it should be im confused o_O
it displays only Str XP: 0/16 then after a few clicks it changed to 16/25 and hasnt changed back since:/
can anyone help?
(what first happend, is when I first added the thing to inrease $strlvl, strXP jumped from 0 to 16, and I think thats whats happening, its not remembering the value? perhaps I should use $_SESSION or Globals?
Code: Select all
<?php
session_start();
?>
<html>
<body>
<head>
<style type='text/css'>
body
{
background-image:
url('SilverBG.jpg')
}
</style>
</head>
<DIV STYLE='Position: absolute; top: 0; left: 0;'>
<img src="Mythic Aeons Banner.jpg" width="1024" height="1">
</div>
<DIV STYLE='Position: absolute; Top: 250; Left: 25;'>
<!--<td style="color: #FFFFFF;">lots of text here</td>
Color group of text -->
<?php
//warrior stats
if (!isset($strlvl))
{$strlvl=4;}
if (!isset($strXP))
{$strXP=0;}
if (!isset($ML))
{$ML=1;}
if (!isset($strREQ))
{$strREQ=$strlvl * $ML * $strlvl;}
//dex
//$dexXP=0;
//$dexlvl=4;
//def
//$defXP=0;
//$deflvl=3;
//int
//$intXP=0;
//$intlvl=2;
//focus
//$focXP=0;
//$foclvl=2;
//lifemagic
//$life=12;
//$mag=3;
//other
//$sxp=0;
//$gold=10;
//
//multiplications
if ($strXP=$strlvl * $ML * $strlvl)
{
$strlvl=$strlvl+1;
$strREQ=$strlvl * $ML * $strlvl;
}
echo $strXP.'<br />';
echo "<font color='blue' size='3'>Str XP: ".$strXP." / ".$strREQ;
$strXP=$strXP+1;
?>
</div>
<DIV STYLE='Position: absolute; Top: 375; Left: 0;'>
</body>
</html>can anyone help?
(what first happend, is when I first added the thing to inrease $strlvl, strXP jumped from 0 to 16, and I think thats whats happening, its not remembering the value? perhaps I should use $_SESSION or Globals?