0
I am currently trying to upload several images at the same time to the table images, these have to be stored all together or within an array right? in such a way (http://gyazo.com/237d0e2107dcd90c388b139c64a6b4a6), my problem is that the code I have makes me feel like I have to insert one by one to appear on the site like this:(http://gyazo.com/81566817c75b802e670352031ecbc00b) basically what I want is inside the picture table to store an image that contains several images to feed a slide.
$fdata = $_FILES['img'];
$uploads_dir = '/upload';
//echo count($fdata['name']);
for($i = 0; $i < count($fdata['name']); ++$i)
{
$data=date("ymd");
$query=("insert into `portfolio_imagens` (`nome`, `descricao`,`cliente`,`imagem`,`publicacao`) VALUES ('".$_POST['nome']."','".$_POST['descricao']."','".$_POST['cliente']."','".$name."','".$data."')"); $result=mysql_query($query);
$name = $_FILES['img']['name'][$i];
$temp_name = $_FILES['img']['tmp_name'][$i];
move_uploaded_file($temp_name, "$uploads_dir"."$name");
}
I didn’t understand the problem.
– Jorge B.
i want to add projects in which each project has the corresponding images, then on the site on the homepage appears the main image of the project and when I click on it sends me to projects.php where it has the project information and a Carousel to pass the images I entered, but what I need is to add the images in each project.
– cloud
first project add->table images-> introduces a set of images->imagem1.png,imagem2.png,imagem3.png
– cloud