title: Order Status Script
body: <p>I am trying to make an order status page where I will manually adjust in the phpmyadmin however I'd like people to be able to use a form to put in their order number then be given the appropriate name and status attatched to that order number.</p>
  
  <p>This is index.php</p>
  
  <pre><code>&lt;?php
  $username = "username";
  $password = "password";
  $hostname = "localhost"; 
  $dbhandle = mysql_connect($hostname, $username, $password) 
  or die("Unable to connect to MySQL");
  echo "Connected to MySQL&lt;br&gt;";
  ?&gt;
  &lt;form method="POST" action="action.php"&gt;
  &lt;input type="text" name="term" /&gt;
  &lt;input type="submit" value="Submit" name="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is my action.php</p>
  
  <pre><code> &lt;?php
  $username = "evo_readle";
  $password = "judo08";
  $hostname = "localhost"; 
  $dbhandle = mysql_connect($hostname, $username, $password) 
  or die("Unable to connect to MySQL");
  echo "Connected to MySQL&lt;br&gt;";
  $term = mysql_real_escape_string($_REQUEST['term']);    
  $query = mysql_query("SELECT * FROM orders WHERE number ='%".$term."%'");
  $user = mysql_fetch_assoc($query);
  echo "Hello User, your name is" .$user['name'];
  ?&gt;
  </code></pre>