PHP Code problem, web browser game?

VanjaMees

New member
So, i started to make a Web Browser Game today, but i have a problem in my script.
There's an page in my game that shows all the players Name & Score & Money, but with money..
If the logged in player has 1$ then all of the players have 1$ but other actually have like 50000$...
How do i fix that prob ?

Heres the script:

{include file="header.tpl" TITLE="Kasutajad / Mängijad"}

<table width="90%">
<tr>
<th style="text-align: left;">Kasutaja</th>
<th style="text-align: left;">Level</th>
<th style="text-align: left;">Raha</th>
</tr>

{foreach from=$members item=member}
<tr>
<td>{$member->username}</td> <<<ALSO USERNAME WORKS FINE>>>
<td>{$member->level}</td> <<< LEVEL WORKS FINE >>>
<td>{$player->money}</td> <<THE MONEY LINE, if i change $player to $member, its empty!>
</tr>
{/foreach}
</table>

<span class="space"></span>

<span style="display: block; width: 90%; text-align: center;">
<strong>
<a href="index.php?mod=Members&page={$prevpage}">Eelmine</a> | <a href="index.php?mod=Members&page={$nextpage}">Järgmine</a>
</strong>
</span>

{include file="footer.tpl"}
 
Back
Top