 <p>You must assign <code>$connection</code> to a</p> <pre><code>mysql_connect() </code></pre> <p>function</p> <p>Anyway you should not use mysql functions anymore because they are deprecated. You can use <a href="http://net.tutsplus.com/tutorials/php/php-database-access-are-you-doing-it-correctly/" rel="nofollow">PDO</a> instead.</p>