title: Check isset variable _GET and check if existe in database
body: <p>How can i check if variable _GET isset and compare if that variable value exist in database?</p>
  
  <p>I have this follow code:</p>
  
  <pre><code>//require connection bd
  
  $vtld = $_GET['tld']; //variable from _GET
  
  $sql="SELECT extension FROM tbldomainpricing";
  
  $result = mysql_query($sql) or die(mysql_error());
  $row = mysql_fetch_assoc($result);
  
  if ($row['extension'] == '$vtld') {
      echo $vtld.' variavel exist' ;
  } else {
      echo $vtld.' variavel not exist';
  }
  </code></pre>
  
  <p>The page A send variable _GET and page B recive that variable and check if exist in database</p>
  
  <p>Page A - EX: domain.com/folder/index.php?page=tld&amp;<strong>tld=.org</strong></p>
  
  <p>Page B - recive variable and check if exist.</p>
  
  <p>thanks in advance</p>