title: Check MySQL DB for value
body: <p>Hi guys im trying to check if a value(token) inside my MYSQL DB exists.</p>
  
  <p>Main informations:</p>
  
  <p>Table: Tokens
  Column: Token</p>
  
  <p>My latest try:</p>
  
  <pre><code>&lt;?php
      // DATABASE STUFF
      $servername = "localhost";
      $username = "userhere";
      $password = "passhere";
      $dbname = "zwinky";
      $token = $_GET['a'];
  
      $conn = new mysqli($servername, $username, $password, $dbname);
      if ($conn-&gt;connect_error) {
          die("Connection failed: " . $conn-&gt;connect_error);
      } 
  
      $result = mysql_query("SELECT * FROM Tokens WHERE Token = '$token'");
      $matchFound = mysql_num_rows($result) &gt; 0 ? 'yes' : 'no';
      echo $matchFound;
  ?&gt;
  </code></pre>
  
  <p>Does anyone have a idea?</p>