Php storing url image path in MySQL DB
<p>I am trying to store URL Image paths into MySQL DB. But i am not getting any results with my code. </p>

<ul>
<li>Why is it not storing anything?</li>
<li>Would it be better just to store the image name or the entire path? 
target example: "www.example.com/medium/imagename.jpg" </li>
</ul>

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

<pre><code>id: autoincrement
image_name 



Php code for inserting data into DB
&lt;?php

$images = explode(',', $_GET['i']);

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


if(is_array($images)){

    $objDb = new PDO("mysql:host=" . $host . ";dbname=" . $db, $user, $pass);
    $objDb-&gt;exec('SET CHARACTER SET utf8');

    $sql = "INSERT INTO `urlImage` (`image_name`) VALUES ";

  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;';
    $value[] = "(".$path.$image.")"; // collect imagenames
  }

  $sql .= implode(',', $value).";"; //build query

  $objDb-&gt;query($sql);   
}

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