title: Zend Controller configuration to use new Search form
body: <p>I purchased a boilerplate script for my own personal Google Drive or Dropbox, if you will. One of the first features I wanted to add to this script was the ability to search for files in the repository, by name( excluding certain regex for now). The script is coded in PHP, and I'm not familiar with the ZEND framework so resource locations have been a hassle. I've been reading the ZEND framework reference but I think I'm missing some essential knowledge:</p>
  
  <p><a href="http://framework.zend.com/manual/1.12/en/reference.html" rel="nofollow">http://framework.zend.com/manual/1.12/en/reference.html</a></p>
  
  <p><strong>The error:</strong>
      <a href="http://cl.ly/image/3A0B360T1B2f" rel="nofollow">http://cl.ly/image/3A0B360T1B2f</a></p>
  
  <p><strong>In a file called index.phtml in my /views directory:</strong></p>
  
  <pre><code>&lt;?php
  echo &lt;&lt;&lt;DPRS
  &lt;html&gt; &lt;head&gt;
  &lt;title&gt;Search Form&lt;/title&gt; &lt;head&gt;
  &lt;body&gt;
  &lt;form id="myform" action="search.php" method="POST"&gt;
  Search for: &lt;input type="text" name="search_text" /&gt;
  &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  DPRS;
  ?&gt;
  </code></pre>
  
  <p><strong>In a file called search.php in my /controllers directory (I've omitted my db details, the db, table and column exist on my server):</strong></p>
  
  <pre><code>&lt;?php
  $search_val = $_POST['search_text'];
  
  $hostname = "hostname"; 
  $username = "username"; 
  $password = "password"; 
  $database = "database"; 
  $tablename = "table"; 
  
  $connection = mysql_connect($hostname, $username, $password);
  if($connection) { 
  if(mysql_select_db($database, $connection)) {
  $result = mysql_query("SELECT * FROM $tablename");
  while($row = mysql_fetch_array($result)) { 
  if($row['COLUMN'] == $search_val) { 
  echo $row['COLUMN'] . "
  \n"; 
  }
  }
  } else {
  die("Could not connect to database " . $database);
  }
  } else {
  die("Could not connect to host: " . mysql_error());
  }
  ?&gt;
  </code></pre>
  
  <p>Help, pointers, manuals are all greatly appreciated! </p>