嘿,我正在制作一台老虎机,几乎完成了。我唯一需要的是留下信用,所以它只是在信用上加分。就像如果我有 100 个学分然后得到 25 个学分,我希望它说 125 个学分。现在我不知道如何从之前的回合中获得学分。
这就是我得到的:
<?
$tal = rand (1,3 ); {
echo "<img src='css/billeder/enarmet$tal.gif' class=billed />";
$tal2 = rand (1,3 );
echo "<img src='css/billeder/enarmet$tal2.gif' class=billed />";
$tal3 = rand (1,3 );
echo "<img src='css/billeder/enarmet$tal3.gif' class=billed />"; }
?>
</div>
<div id="credits">
<h3 id="credits2">CREDITS</h3>
<h3 id="credits3"><?php
$credits=$_GET['credits'];
if ($tal . $tal2 . $tal3 == 111){
($credits=($credits+100));
}
if ($tal . $tal2 . $tal3 == 222){
($credits=($credits+50));
}
if ($tal . $tal2 . $tal3 == 333){
($credits=($credits+25));
}
echo $credits;
?></h3>
</div>
</div>
<form action="index.php" method="POST">
<input type="submit" value="SPIN" class="knap">
</form>
<form action="cashout.php" method="POST">
<input type="submit" value="CASH OUT" class="knap">
</form>
</div>