title: Php post with direct link
body: <p>I have a players page which returns a list of players and provides you with some options. One is edit and the other is stats. The edit page predictably takes you to a form where you can edit the player info like name, while the stats page simply shows statistics to do with that player (such as games played) that come primarily from other tables. Currently this a snippet of the code used to get stats:</p>
  
  <pre><code>if (isset($_POST['action']) and $_POST['action'] == 'Stats')
  {
  include $_SERVER['DOCUMENT_ROOT'] . '/statsite/includes/db.inc.php';
  
  try
  {
  $sql = 'SELECT id, user.usertitle as name, role, aggression, position, bowlstyle, cricket_players.username, link FROM cricket_players INNER JOIN user ON cricket_players.username = user.userid WHERE id = :id';
  $s = $pdo-&gt;prepare($sql);
  $s-&gt;bindValue(':id', $_POST['id']);
  $s-&gt;execute();
  }
  catch (PDOExecption $e)
  {
    $error = 'Error retrieving player details';
    include 'players.html.php';
    exit();
  }
  
  $row = $s-&gt;fetch();
  
  $pageTitle = 'View Stats';
  $name = $row['name'];
  $aggression = $row['aggression'];
  $position = $row['position'];
  $role = $row['role'];
  $bowlstyle = $row['bowlstyle'];
  $link = $row['link'];
  $username = $row['username'];
  $id = $row['id'];
  
  include 'stats.html.php';
  exit();
  }
  </code></pre>
  
  <p>If I click on the stats button everything works fine, but the address bar only has /? on the end of the address of the players page. Is there any way that I can get it to display something such as /stats?id=1 so that it can be linked directly?</p>