Ok I don't understand why the update statement only works once.. and after it rolls another 6, it wont add another 500 to the RP amount.
<?php
session_start();
include("logincheck.php");
?>
<?php include_once("header.php"); ?>
<td width='100%' valign='top' align='center'>
<center><?php
$dice = rand(1,6);
echo "You rolled a<br /><b>{$dice}</b>\n";
if($dice == 6)
{
include("haha.php");
$cxn = mysqli_connect($dbhost,$dbuser,$dbpassword,$dbdatabase);
$winnings = "500";
$username = $_SESSION['username'];
$sql = "UPDATE `Member` SET `rp` = 'rp' + '$winnings' WHERE `username` = '$username'";
mysqli_query($cxn,$sql);
}
?></center>
</td></p>
<?php include_once("footer.php"); ?>
Can anyone figure out why? I mean it works one time...