title: Simple search to search database table and display result on same page (php/mysql)
body: <p>I'm trying to build a simple seach that searches the <code>Store_ID</code> column in a database table and prints the corresponding <code>GoLive</code> date from another column but with v.basic PHP skills I'm struggling.</p>
  
  <p>Here is the search code I'm using:</p>
  
  <pre><code>&lt;form name="search" method="get"&gt; 
  &lt;input type="text" name="store_num"/&gt; &lt;br /&gt;
  &lt;input type="submit"  value="submit"  name="submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And here is the MySQL query that I'm trying to execute:</p>
  
  <pre><code>$results = $wpdb-&gt;get_results("SELECT * 
                                 FROM wp_Table_GoLive_Date 
                                 WHERE Store_ID = 818");
   foreach($results as $r) {
            echo "&lt;p&gt;&lt;b&gt;".$r-&gt;GoLive_Date."&lt;/b&gt;&lt;/p&gt;"; 
       } 
  </code></pre>
  
  <p>My trouble is that my coding knowledge is limited and I can't seem to pass the input of the search to the mysql. I need guidance on getting the search box input data (which will be a store number) to send to the mysql query in place of the '818'.</p>
  
  <p>Any ideas?</p>
  
  <p>Additional info:</p>
  
  <p>The database table has 3 columns: </p>
  
  <p>ID       Store_ID      GoLive_Date</p>
  
  <p>The output of this query:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>$results = $wpdb-&gt;get_results("SELECT * FROM wp_Table_GoLive_Date WHERE Store_ID = 818");
   foreach($results as $r) {
            echo "&lt;p&gt;&lt;b&gt;".$r-&gt;GoLive_Date."&lt;/b&gt;&lt;/p&gt;"; 
       } </code></pre>
  </div>
  </div>
  </p>
  
  <p>is the corresponding date in the GoLive_Date column:  02/02/2015</p>