title: PHP page to run MySQL query
body: <p>I need a PHP+HTML page which would ask for two values from user i.e. password &amp; id_category. </p>
  
  <p>So far I have coded the PHP as:</p>
  
  <pre><code>&lt;?php
  $servername = "localhost";
  $username = "username";
  $password = "password";
  $dbname = "db1";
  
  
  // Create connection
  $conn = new mysqli($servername, $username, $password, $dbname);
  // Check connection
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
  }
  
  $sql = "select user_id,mobile from test_user_table where id_category like '912' or id_category like '912%' or id_category like '%912%' or id_category like '%912'";
  $result = $conn-&gt;query($sql);
  
  if ($result-&gt;num_rows &gt; 0) {
      // output data of each row
      while($row = $result-&gt;fetch_assoc()) {
          echo "id: " . $row["user_id"]. " - Mobile: " . $row["mobile"]. "&lt;br&gt;";
      }
  } else {
      echo "0 results";
  }
  $conn-&gt;close();
  ?&gt;
  </code></pre>
  
  <p>I need a HTML page which would ask for those two variables and pass on to this code i.e. value of password to $password &amp; id_category to the select statement (instead of 912)</p>
  
  <p>Pls help</p>