<?php
include "gloabals.php";
if (!isset($_GET['ben']))
{
print" Sleep time
Go to sleep
<a href='sleep.php?ben==sleep>Go to sleep</a>
}
else
{
if (!isset($_GET['ben'] ==sleep)
}
$outcome=rand=(1,2);
$cash=rand(100,1000);
$strength=rand(1,10);
if ($outcome==1)
{
echo"You get a good night sleep, you also get some cash in the morining by a nobody";
$db->query("UPDATE userstats SET strength=strength+ $strength WHERE userid=$userid");
$db->query("UPDATE users SET money=money+ $cash WHERE userid=$userid");
}
if ($outcome==2)
{
echo"You get woke up and had a terrible night sleep!";
$db->query("UPDATE userstats SET strength=strength- $strength WHERE userid=$userid");
{
$h->endpage();
?>
NOTE: Untested