How do I get PHP to display a user picture if you have one within a blog post?
<p>I have a script that can disply user pictures but I want to have it now so if you don't have a picture it displays a default one.</p>

<p><strong>CODE</strong></p>

<pre><code>if (file_exists($displayuserimage)) {
    $displayuserimage =  '&lt;img src="upic/'. $posts['userid'].'.jpg" width="50px" height="50px" border="2"  /&gt;';
} else {
    $displayuserimage =  '&lt;img src="upic/default.jpg" width="50px" height="50px" border="2"/&gt;'; 
}
</code></pre>

<p>That's what im guessing, but this is the working script, that shows images if you have one:</p>

<pre><code>$displayuserimage = '&lt;img src="upic/'. $posts['userid'].'.jpg" width="50px" height="50px" border="2"/&gt;';
</code></pre>
