How to put an image link in PHP script
<p>I'm writing a CMS that user can post some news and comments. I have problems with images. would like to place all images of all posts in one folder and access them by post ID and image ID (starting from 0 for each post)</p>

<p>The only thing I can't manage to do is producing image links in script. I saw some pages on net doing same thing. like this:</p>

<pre><code>&lt;img src=https://www.somewhere.com/uploads/image.php?postid=20&amp;id=80&gt;
</code></pre>

<p><strong>EDIT:</strong> to clarify, supposing there is an image in <code>http://www.somewhere.com/uploads/1_2.jpg</code> how script can pass the image when <code>https://www.somewhere.com/uploads/image.php?postid=x&amp;id=y</code> is the source of img tag in somewhere?</p>
