title: Trying to get property of non-object.. I'm lost
body: <pre><code>&lt;?php if($user-&gt;premium): ?&gt;
          &lt;p&gt;You are premium!&lt;/p&gt;
      &lt;?php else: ?&gt;
          &lt;p&gt;You are not premium. &lt;a href="premium.php"&gt;Go premium&lt;/a&gt;&lt;/p&gt;
      &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>I'm trying to create a premium method for my site I'm working on,but the code on the top dosnt work.</p>