PHP: if image exists show image else show different image
<p>i am making a login system with registration and a profile page in php and i am trying to make a profile picture work. </p>

<p>if the user has not uploaded a profile picture yet then make it show a "no profile picture" image if the user has uploaded a profile picture make make it show the image that he has uploaded.</p>

<p>Right now it only show the default picture, <code>noprofile.png</code>.</p>

<pre><code>&lt; img src="uploads/&lt; ? echo "$username" ? &gt;/noprofile.png"&gt;
</code></pre>

<p>i want it to show <code>icon.png</code> if <code>icon.png</code> has been uploaded and if it hasnt been uploaded make it show, <code>noprofile.png</code>.</p>
