title: How can change this sql queries to prepared statements?
body: <p>Code:</p>
  
  <pre class="lang-php prettyprint-override"><code>$gameID= $_GET['gid'];
  $con = mysql_connect($dbserver,$dbuser,$dbpassword);
  if (!$con)
  {
     die('Could not connect: ' . mysql_error());
  }
  
  mysql_select_db($dbname, $con);
  
  $sqlselect="SELECT * FROM games WHERE gameid=" . $gameID;
  $result = mysql_query($sqlselect);
  
  $row = mysql_fetch_array($result);
  $gwidth =  $row['width'];
  $gheight = $row['height'];
  
  if($gwidth &gt; 700)&lt;br /&gt; {
    $gwidth = $gwidth * 0.75;
    $gheight = $gheight * 0.75;
  }
  </code></pre>
  
  <p>can anybody tell me how to secure this sql queries ?<br /></p>
  
  <p>VULNERABILITY: CLASSIC MYSQL INJECTION</p>