PHP Storing/Retrieving image names in MySQL DB
<p>I am currently working on a multiple image uploader with file directory. I am wanting to store file name inside my MySQL. </p>

<p>How can I store these variables(image names) inside my table through php ?</p>

<p>How can I retrieve the variables through php?</p>

<p><strong>URL Generate by uploader:</strong> </p>

<ul>
<li><a href="http://www.website.com/imageupload/index.php?i=4ff4bfd02c241.jpg" rel="nofollow">http://www.website.com/imageupload/index.php?i=4ff4bfd02c241.jpg</a></li>
<li><a href="http://www.website.com/imageupload/index.php?i=4ff4bfd02c242.jpg" rel="nofollow">http://www.website.com/imageupload/index.php?i=4ff4bfd02c242.jpg</a></li>
</ul>

<p><strong>Filename:</strong> </p>

<ul>
<li>4ff4bfd02c241.jpg</li>
<li>4ff4bfd02c242.jpg</li>
</ul>

<p><strong>Table Name:</strong> urlimage</p>

<pre><code>id: autoincrement
image_name
</code></pre>

<p><strong>I am able to echo out the path and the name through this:</strong>
    

<pre><code>$images = explode(',', $_GET['i']);

$path = Configuration::getUploadUrlPath('medium', 'target');

foreach ($images as $image) {

    echo '&lt;div&gt;&lt;p&gt;' . $path . $image . '&lt;/p&gt;&lt;img src="' . $path . $image . '" /&gt;&lt;/div&gt;';
}

?&gt;
</code></pre>
