Could you help me solve the problem
The code bellow locate the image path just in "image1"
Something like this
id image1 image2 image3 image4 image5 image6
1 pic1
2 pic2
but I need to get something like this
id image1 image2 image3 image4 image5 image6
1 pic1 pic2 pic2 pic2 pic2 pic2
2
foreach($active_keys as $key)
{
@move_uploaded_file($_FILES[$fieldname]['tmp_name'][$key], $uploadFilename[$key])
or error('receiving directory insuffiecient permission', $uploadForm);
$query_part_1 = '';
$query_part_2 = '';
$i = 1;
// add the comma AFTER you write the key/values to the strings
$query_part_1 .= " image" . $i++ . ",";
$query_part_2 .= " '" . $uploadFilename[$key]. "',";
$query_part_1 = preg_replace("/,$/","",$query_part_1); // remove the comma at the end of the string
$query_part_2 = preg_replace("/,$/","",$query_part_2);
$query = "INSERT INTO `imloop` (" .$query_part_1. ") VALUES (" .$query_part_2. ")";
}
mysql_query($query) or exit($query . '<br />' . mysql_error());
mysql_close($connection);