I tried to upload a profile picture using this code in php
and it saves it in the path that I specify but it does not save anything in the database. I am working with wampserver
and phpmyadmin
.
The code I have is the following:
$imagen = $_FILES['imagen']['name'];
$ruta = "../subidos/" . $_FILES['imagen']['name'];
$resultado = @move_uploaded_file($_FILES["imagen"]["tmp_name"], $ruta);
$modificar=("UPDATE usuario SET nombre = '".$nombre."', pass= '".$password."',
escolar = '".$nivel."',nacimiento='".$fecha2."',foto_perfil='".$image."'
WHERE CodUsua='".$_SESSION["CodUsua"]."'");