Non-object when adding code into html
<p>I am getting the following error:</p>

<blockquote>
  <p>Fatal error: Call to a member function error() on a non-object in /home/gamepla3/public_html/football/result.php on line 177</p>
</blockquote>

<p>The line for this is</p>

<pre><code>&lt;?php echo $form-&gt;error("homescore"); ?&gt;
</code></pre>

<p>I'm failing to see how this could be the case?
The thing worked fine before I added working code into my html document so it looked better.</p>

<p>Now I can't get it working??</p>

<p>EDIT.
When the code is not within HTML, it works fine.
Once I have it within the HTML, it throws back an error?
Has anyone seen anything like this before?</p>
