php game Rock, paper, scissors : <p>So, I am creating a Rock, Paper, Scissor game in php. I am creating two webpages. The first webpage will contain three radio buttons for rock, paper, scissor and one submit button. The first page will send the information to the second page. The second page is the computer. The computer will randomly choose between rock, paper, scissor.</p>

<p>This is what I have right now. It is just not sending the information in the right way.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>First page:
&lt;?php
session_start();    //session start
  if(!isset($_SESSION['username']))     //if session not found redirect to homepage
  {
    header('location:login.php');
  }
    else{
      echo '&lt;form action="game.php" method="post" /&gt;
            &lt;input type="radio" name="user_choice" value="Rock" title="Rock" /&gt;Rock &lt;br /&gt;&lt;br /&gt;
            &lt;input type="radio" name="user_choice" value="Paper" title="Paper" /&gt;Paper &lt;br /&gt;&lt;br /&gt;
            &lt;input type="radio" name="user_choice" value="Scissors" title="Scissors" /&gt;Scissors &lt;br /&gt;&lt;br /&gt;
            &lt;input type="submit" name="form_submit" value="submit"/&gt; 
            &lt;/form&gt; ';
          }
?&gt;

Second Page:
&lt;?php
session_start();    //session start
//if session not found redirect to homepage
if(!isset($_SESSION['username'])) {
    header('location:login.php');
} elseif {
    if($_POST['user_choice']) {
        $user_choice = $_POST['user_choice'];
        $Choosefrom= array('Rock', 'Paper', 'Scissors');
        $Choice= rand(0,2);
        $Computer=$Choosefrom[$Choice];
        if($user_choice == $Computer) {
            echo 'Player: '.$user_choice.' CPU: '.$Computer.'. Result: Win';
        } else {
            echo 'Player: '.$user_choice.' CPU: '.$Computer.'. Result: Lose';
        }
   }
}
?&gt;</code></pre>
</div>
</div>
</p>
