title: MySQL query based on user input
body: <p>I have a DB table. I want to make a text input where the user can input the "uid" and the query will return the row associated with that uid.</p>
  
  <p>So let's say I have something like this:</p>
  
  <pre><code>$query = "SELECT name,age FROM people WHERE uid = '2' LIMIT 0,1";
  $result = mysql_query($query);
  $res = mysql_fetch_assoc($result);
  
  echo $res["age"];
  </code></pre>
  
  <p>how would I modify that query to something like..</p>
  
  <pre><code>SELECT name, age 
    FROM people 
   WHERE uid = $_POST['blahblah'] LIMIT 0,1
  </code></pre>
  
  <p>Thanks in advance for your help!</p>