 <p>You are checking for <code>Submit</code> in <code>$_POST</code>, but the method specified in the form is <code>GET</code>.</p> <p>To have it work, change the PHP code to look for <code>$_GET['Submit']</code>.</p> <p>(But I'd move instead everything, form method included, to <code>POST</code>).</p> <p>That said, your script seems to have been pasted twice, the second version using <code>$q</code> instead of <code>$trimmed</code> (is <code>$q</code> defined?), and a SQL table called 'table' instead of 'questions':</p> <pre><code>// get results $query = "SELECT * FROM table WHERE question LIKE '%$q%' OR name LIKE '%$q%' or detail like '%$q%'"; $result = mysql_query($query) or die("Couldn't execute query"); </code></pre>