title: How to compare inserted value with stored value
body: <p>Query: </p>
  
  <p>User input value(varchar) through sponsor id page (Simple form), then if id matched then move to registration page, for registration.</p>
  
  <p>Verify Page:</p>
  
  <pre><code>&lt;form action="verify_check.php" method="post" class="basic-grey"&gt;
  
      &lt;label&gt;
          &lt;span&gt;Sponser ID :&lt;/span&gt;
          &lt;input type="text" name="token" value="" /&gt;
      &lt;/label&gt;
  
       &lt;label&gt;
          &lt;span&gt;&amp;nbsp;&lt;/span&gt; 
          &lt;input type="submit" class="button" value="SignUp"  name="submit"/&gt; 
      &lt;/label&gt;    
  &lt;/form&gt;
  </code></pre>
  
  <p>Verify_check Page:</p>
  
  <pre><code>&lt;?php 
  if (isset($_POST['submit']))
  {
  $token=$_POST['token'];
  $conn=mysqli_connect("localhost","root","", "gold_99") ;
  
  if(!$conn)
  {
  die("connection failed: ".mysqli_connect_error());
  }
  
  
  $sql = "SELECT * FROM personal_deatils WHERE userid = '$token'";
  $row = mysql_fetch_array($sql)
   if (mysqli_query($conn, $sql)) 
   {
      if($row =="$token"){
      echo "Data Select Succefully";
      }
      else
      echo "Wrong Connection";
  
  } 
  
  else {
      echo "Error: " . $sql . "&lt;br&gt;" . mysqli_error($conn);
  }
  }
  mysqli_close($conn);
  
  ?&gt;
  </code></pre>
  
  <p>Database Architecture:</p>
  
  <p>title (varchar), firstname (varchar), userid (varchar, primary), mobileno (varchar), email (varchar), country (varchar)</p>