PHP help on number Generater
<p>Here is my code:</p>

<pre><code>&lt;html&gt;
    &lt;title&gt;Game Process&lt;/title&gt;
    &lt;/head&gt;

    &lt;body&gt;
    &lt;?php
    $userguess= $_POST["number"];
    $gennumber = rand(0,20);
    if ($gennumber &gt; $userguess) {
        $result="lost";
        echo "You have lost your guess was too low! The number was:".$gennumber;
    } elseif ($gennumber == $userguess){
        echo "Wow you are extreamly lucky to get ".$gennumber;  $result="won";
    } else {
        echo "You have lost your guess was too high! The number was: ".$gennumber;
    $result="lost";
    }
    ?&gt;
</code></pre>

<p>this is the problem I am trying to see if <code>$count</code> is equal to nothing and if it is than set it to 1. I have done some research into <code>isset</code> and <code>empty</code> put I don't know how to use them and as I said Iam a newbie in programming!</p>

<pre><code>    &lt;?php
    $_SESSION['count']=$count;
    if (!$count){

         } else {
             $count = 1;
         }


    if ($result == "lost"){
    echo '&lt;a href="Game.php"&gt;&lt;input type="button" value="Have another guess!"/&gt;&lt;/a&gt;';
    $count +1;
    echo "&lt;br&gt;your number of guess are: ".$count; 
    } else {
        echo "well done!&lt;br&gt;";
        echo "your number of guess are: ".$count; 
    }

    ?&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>
