Good morning, I need to upload a file and save it in an "IMG" folder, when doing the process the insert in the database is correct but the image is not saved in the server, here is the code, I hope can you help.
if(is_uploaded_file($_FILES['foto1']['tmp_name']))
{
//recojo la imagen
$imagen = $_FILES['foto1']['name'];
//Obtengo el nombre de la imagen y la extensión de la foto
$imagen1 = explode(".",$imagen);
$unico=time();
//$pic=$unico.".".$imagen1[1];
$pic=$unico.".".$imagen1[1];
$pic="catalogos/capturanra/img/".$pic;
//$pic1="manifiestos/catalogos/capturanra/img/".$pic;
//Genero un nombre aleatorio con números y se asigno la extensión botenido anteriormente
// $imagen2 = rand(0,9).rand(100,9999).rand(100,9999).".".$imagen1[1];
//Coloco la iamgen del usuario en la carpeta correspondiente con el nuevo nombre
if (strpos($pic, "gif") || strpos($pic, "jpeg") || strpos($pic,"jpg") || strpos($pic,"png") ){
move_uploaded_file($_FILES['foto1']['tmp_name'],$pic);
// echo "Foto: <img src='img/".$nombre."' width=100 height=100>";
I hope you help me, I do not know what to do anymore
Greetings